/**
 */
package BlipTGG.Rules.impl;

import BlipLanguage.BlipApplication;
import BlipLanguage.BlipLanguageFactory;
import BlipLanguage.BlipModel;
import BlipLanguage.BlipModelAttribute;

import BlipTGG.BlipTGGFactory;
import BlipTGG.MApplicationToApplication;
import BlipTGG.MModelAttributeToModelAttribute;
import BlipTGG.MModelToModel;

import BlipTGG.Rules.MApplicationToApplicationRule;
import BlipTGG.Rules.RulesPackage;

import MocaTree.Attribute;
import MocaTree.MocaTreeFactory;
import MocaTree.Node;

import TGGLanguage.csp.*;

import TGGRuntime.Edge;
import TGGRuntime.IsApplicableMatch;
import TGGRuntime.IsApplicableRuleResult;
import TGGRuntime.IsAppropriateRuleResult;
import TGGRuntime.Match;
import TGGRuntime.PerformRuleResult;
import TGGRuntime.TGGRuntimeFactory;

import TGGRuntime.impl.AbstractRuleImpl;

import csp.constraints.*;

import de.upb.tools.sdm.*;

import java.lang.reflect.InvocationTargetException;

import java.util.*;

import org.eclipse.emf.common.util.EList;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EOperation;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>MApplication To Application Rule</b></em>'.
 * <!-- end-user-doc -->
 * <p>
 * </p>
 *
 * @generated
 */
public class MApplicationToApplicationRuleImpl extends AbstractRuleImpl
		implements MApplicationToApplicationRule {
	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected MApplicationToApplicationRuleImpl() {
		super();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	protected EClass eStaticClass() {
		return RulesPackage.Literals.MAPPLICATION_TO_APPLICATION_RULE;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public PerformRuleResult perform_FWD(IsApplicableMatch isApplicableMatch) {
		boolean fujaba__Success = false;
		Object _TmpObject = null;
		Attribute androidMapsApiKeyAttr = null;
		Attribute androidPlayLibraryPathAttr = null;
		Node applicationNode = null;
		Attribute packageNameAttr = null;
		Attribute titleAttr = null;
		Iterator fujaba__IterIsApplicableMatchToCsp = null;
		CSP csp = null;
		MApplicationToApplication mApplicationToApplication = null;
		BlipApplication application = null;
		PerformRuleResult ruleresult = null;
		Edge applicationNode__attribute__titleAttr = null;
		Edge applicationNode__attribute__androidMapsApiKeyAttr = null;
		Edge mApplicationToApplication__target__application = null;
		Edge applicationNode__attribute__androidPlayLibraryPathAttr = null;
		Edge applicationNode__attribute__packageNameAttr = null;
		Edge mApplicationToApplication__source__applicationNode = null;

		// story node 'perform transformation'
		try {
			fujaba__Success = false;

			_TmpObject = (isApplicableMatch.getObject("androidMapsApiKeyAttr"));

			// ensure correct type and really bound of object androidMapsApiKeyAttr
			JavaSDM.ensure(_TmpObject instanceof Attribute);
			androidMapsApiKeyAttr = (Attribute) _TmpObject;
			_TmpObject = (isApplicableMatch
					.getObject("androidPlayLibraryPathAttr"));

			// ensure correct type and really bound of object androidPlayLibraryPathAttr
			JavaSDM.ensure(_TmpObject instanceof Attribute);
			androidPlayLibraryPathAttr = (Attribute) _TmpObject;
			_TmpObject = (isApplicableMatch.getObject("applicationNode"));

			// ensure correct type and really bound of object applicationNode
			JavaSDM.ensure(_TmpObject instanceof Node);
			applicationNode = (Node) _TmpObject;
			_TmpObject = (isApplicableMatch.getObject("packageNameAttr"));

			// ensure correct type and really bound of object packageNameAttr
			JavaSDM.ensure(_TmpObject instanceof Attribute);
			packageNameAttr = (Attribute) _TmpObject;
			_TmpObject = (isApplicableMatch.getObject("titleAttr"));

			// ensure correct type and really bound of object titleAttr
			JavaSDM.ensure(_TmpObject instanceof Attribute);
			titleAttr = (Attribute) _TmpObject;
			// check object isApplicableMatch is really bound
			JavaSDM.ensure(isApplicableMatch != null);
			// check isomorphic binding between objects androidPlayLibraryPathAttr and androidMapsApiKeyAttr 
			JavaSDM.ensure(!androidPlayLibraryPathAttr
					.equals(androidMapsApiKeyAttr));

			// check isomorphic binding between objects packageNameAttr and androidMapsApiKeyAttr 
			JavaSDM.ensure(!packageNameAttr.equals(androidMapsApiKeyAttr));

			// check isomorphic binding between objects titleAttr and androidMapsApiKeyAttr 
			JavaSDM.ensure(!titleAttr.equals(androidMapsApiKeyAttr));

			// check isomorphic binding between objects packageNameAttr and androidPlayLibraryPathAttr 
			JavaSDM.ensure(!packageNameAttr.equals(androidPlayLibraryPathAttr));

			// check isomorphic binding between objects titleAttr and androidPlayLibraryPathAttr 
			JavaSDM.ensure(!titleAttr.equals(androidPlayLibraryPathAttr));

			// check isomorphic binding between objects titleAttr and packageNameAttr 
			JavaSDM.ensure(!titleAttr.equals(packageNameAttr));

			// iterate to-many link attributeInfo from isApplicableMatch to csp
			fujaba__Success = false;

			fujaba__IterIsApplicableMatchToCsp = isApplicableMatch
					.getAttributeInfo().iterator();

			while (!(fujaba__Success)
					&& fujaba__IterIsApplicableMatchToCsp.hasNext()) {
				try {
					_TmpObject = fujaba__IterIsApplicableMatchToCsp.next();

					// ensure correct type and really bound of object csp
					JavaSDM.ensure(_TmpObject instanceof CSP);
					csp = (CSP) _TmpObject;

					fujaba__Success = true;
				} catch (JavaSDMException fujaba__InternalException) {
					fujaba__Success = false;
				}
			}
			if (!fujaba__Success) {
				fujaba__Success = true;
				csp = null;
			}
			// attribute condition
			JavaSDM.ensure(JavaSDM.stringCompare(applicationNode.getName(),
					"Application") == 0);

			// attribute condition
			JavaSDM.ensure(JavaSDM.stringCompare(
					androidMapsApiKeyAttr.getName(), "androidMapsApiKey") == 0);

			// attribute condition
			JavaSDM.ensure(JavaSDM.stringCompare(
					androidPlayLibraryPathAttr.getName(),
					"androidPlayLibraryPath") == 0);

			// attribute condition
			JavaSDM.ensure(JavaSDM.stringCompare(packageNameAttr.getName(),
					"packageName") == 0);

			// attribute condition
			JavaSDM.ensure(JavaSDM.stringCompare(titleAttr.getName(), "title") == 0);

			// create object mApplicationToApplication
			mApplicationToApplication = BlipTGGFactory.eINSTANCE
					.createMApplicationToApplication();

			// create object application
			application = BlipLanguageFactory.eINSTANCE.createBlipApplication();

			// assign attribute application
			application.setTitle((java.lang.String) csp.getAttributeVariable(
					"application", "title").getValue());
			// assign attribute application
			application.setPackageName((java.lang.String) csp
					.getAttributeVariable("application", "packageName")
					.getValue());
			// assign attribute application
			application.setAndroidPlayLibraryPath((java.lang.String) csp
					.getAttributeVariable("application",
							"androidPlayLibraryPath").getValue());
			// assign attribute application
			application.setAndroidMapsApiKey((java.lang.String) csp
					.getAttributeVariable("application", "androidMapsApiKey")
					.getValue());

			// create link
			mApplicationToApplication.setSource(applicationNode);

			// create link
			org.moflon.util.eMoflonEMFUtil.addOppositeReference(
					mApplicationToApplication, application, "target");
			fujaba__Success = true;
		} catch (JavaSDMException fujaba__InternalException) {
			fujaba__Success = false;
		}

		// story node 'collect translated elements'
		try {
			fujaba__Success = false;

			// check object androidMapsApiKeyAttr is really bound
			JavaSDM.ensure(androidMapsApiKeyAttr != null);
			// check object androidPlayLibraryPathAttr is really bound
			JavaSDM.ensure(androidPlayLibraryPathAttr != null);
			// check object application is really bound
			JavaSDM.ensure(application != null);
			// check object applicationNode is really bound
			JavaSDM.ensure(applicationNode != null);
			// check object mApplicationToApplication is really bound
			JavaSDM.ensure(mApplicationToApplication != null);
			// check object packageNameAttr is really bound
			JavaSDM.ensure(packageNameAttr != null);
			// check object titleAttr is really bound
			JavaSDM.ensure(titleAttr != null);
			// check isomorphic binding between objects androidPlayLibraryPathAttr and androidMapsApiKeyAttr 
			JavaSDM.ensure(!androidPlayLibraryPathAttr
					.equals(androidMapsApiKeyAttr));

			// check isomorphic binding between objects packageNameAttr and androidMapsApiKeyAttr 
			JavaSDM.ensure(!packageNameAttr.equals(androidMapsApiKeyAttr));

			// check isomorphic binding between objects titleAttr and androidMapsApiKeyAttr 
			JavaSDM.ensure(!titleAttr.equals(androidMapsApiKeyAttr));

			// check isomorphic binding between objects packageNameAttr and androidPlayLibraryPathAttr 
			JavaSDM.ensure(!packageNameAttr.equals(androidPlayLibraryPathAttr));

			// check isomorphic binding between objects titleAttr and androidPlayLibraryPathAttr 
			JavaSDM.ensure(!titleAttr.equals(androidPlayLibraryPathAttr));

			// check isomorphic binding between objects titleAttr and packageNameAttr 
			JavaSDM.ensure(!titleAttr.equals(packageNameAttr));

			// create object ruleresult
			ruleresult = TGGRuntimeFactory.eINSTANCE.createPerformRuleResult();

			// assign attribute ruleresult
			ruleresult.setSuccess(true);

			// create link
			org.moflon.util.eMoflonEMFUtil.addOppositeReference(ruleresult,
					applicationNode, "translatedElements");

			// create link
			org.moflon.util.eMoflonEMFUtil.addOppositeReference(ruleresult,
					androidPlayLibraryPathAttr, "translatedElements");

			// create link
			org.moflon.util.eMoflonEMFUtil.addOppositeReference(ruleresult,
					androidMapsApiKeyAttr, "translatedElements");

			// create link
			org.moflon.util.eMoflonEMFUtil.addOppositeReference(ruleresult,
					titleAttr, "translatedElements");

			// create link
			org.moflon.util.eMoflonEMFUtil.addOppositeReference(ruleresult,
					packageNameAttr, "translatedElements");

			// create link
			org.moflon.util.eMoflonEMFUtil.addOppositeReference(ruleresult,
					mApplicationToApplication, "createdLinkElements");

			// create link
			org.moflon.util.eMoflonEMFUtil.addOppositeReference(ruleresult,
					application, "createdElements");
			fujaba__Success = true;
		} catch (JavaSDMException fujaba__InternalException) {
			fujaba__Success = false;
		}

		// story node 'bookkeeping for edges'
		try {
			fujaba__Success = false;

			// check object androidMapsApiKeyAttr is really bound
			JavaSDM.ensure(androidMapsApiKeyAttr != null);
			// check object androidPlayLibraryPathAttr is really bound
			JavaSDM.ensure(androidPlayLibraryPathAttr != null);
			// check object application is really bound
			JavaSDM.ensure(application != null);
			// check object applicationNode is really bound
			JavaSDM.ensure(applicationNode != null);
			// check object mApplicationToApplication is really bound
			JavaSDM.ensure(mApplicationToApplication != null);
			// check object packageNameAttr is really bound
			JavaSDM.ensure(packageNameAttr != null);
			// check object ruleresult is really bound
			JavaSDM.ensure(ruleresult != null);
			// check object titleAttr is really bound
			JavaSDM.ensure(titleAttr != null);
			// check isomorphic binding between objects androidPlayLibraryPathAttr and androidMapsApiKeyAttr 
			JavaSDM.ensure(!androidPlayLibraryPathAttr
					.equals(androidMapsApiKeyAttr));

			// check isomorphic binding between objects application and androidMapsApiKeyAttr 
			JavaSDM.ensure(!application.equals(androidMapsApiKeyAttr));

			// check isomorphic binding between objects applicationNode and androidMapsApiKeyAttr 
			JavaSDM.ensure(!applicationNode.equals(androidMapsApiKeyAttr));

			// check isomorphic binding between objects mApplicationToApplication and androidMapsApiKeyAttr 
			JavaSDM.ensure(!mApplicationToApplication
					.equals(androidMapsApiKeyAttr));

			// check isomorphic binding between objects packageNameAttr and androidMapsApiKeyAttr 
			JavaSDM.ensure(!packageNameAttr.equals(androidMapsApiKeyAttr));

			// check isomorphic binding between objects titleAttr and androidMapsApiKeyAttr 
			JavaSDM.ensure(!titleAttr.equals(androidMapsApiKeyAttr));

			// check isomorphic binding between objects application and androidPlayLibraryPathAttr 
			JavaSDM.ensure(!application.equals(androidPlayLibraryPathAttr));

			// check isomorphic binding between objects applicationNode and androidPlayLibraryPathAttr 
			JavaSDM.ensure(!applicationNode.equals(androidPlayLibraryPathAttr));

			// check isomorphic binding between objects mApplicationToApplication and androidPlayLibraryPathAttr 
			JavaSDM.ensure(!mApplicationToApplication
					.equals(androidPlayLibraryPathAttr));

			// check isomorphic binding between objects packageNameAttr and androidPlayLibraryPathAttr 
			JavaSDM.ensure(!packageNameAttr.equals(androidPlayLibraryPathAttr));

			// check isomorphic binding between objects titleAttr and androidPlayLibraryPathAttr 
			JavaSDM.ensure(!titleAttr.equals(androidPlayLibraryPathAttr));

			// check isomorphic binding between objects applicationNode and application 
			JavaSDM.ensure(!applicationNode.equals(application));

			// check isomorphic binding between objects mApplicationToApplication and application 
			JavaSDM.ensure(!mApplicationToApplication.equals(application));

			// check isomorphic binding between objects packageNameAttr and application 
			JavaSDM.ensure(!packageNameAttr.equals(application));

			// check isomorphic binding between objects titleAttr and application 
			JavaSDM.ensure(!titleAttr.equals(application));

			// check isomorphic binding between objects mApplicationToApplication and applicationNode 
			JavaSDM.ensure(!mApplicationToApplication.equals(applicationNode));

			// check isomorphic binding between objects packageNameAttr and applicationNode 
			JavaSDM.ensure(!packageNameAttr.equals(applicationNode));

			// check isomorphic binding between objects titleAttr and applicationNode 
			JavaSDM.ensure(!titleAttr.equals(applicationNode));

			// check isomorphic binding between objects packageNameAttr and mApplicationToApplication 
			JavaSDM.ensure(!packageNameAttr.equals(mApplicationToApplication));

			// check isomorphic binding between objects titleAttr and mApplicationToApplication 
			JavaSDM.ensure(!titleAttr.equals(mApplicationToApplication));

			// check isomorphic binding between objects titleAttr and packageNameAttr 
			JavaSDM.ensure(!titleAttr.equals(packageNameAttr));

			// create object applicationNode__attribute__titleAttr
			applicationNode__attribute__titleAttr = TGGRuntimeFactory.eINSTANCE
					.createEdge();

			// create object applicationNode__attribute__androidMapsApiKeyAttr
			applicationNode__attribute__androidMapsApiKeyAttr = TGGRuntimeFactory.eINSTANCE
					.createEdge();

			// create object mApplicationToApplication__target__application
			mApplicationToApplication__target__application = TGGRuntimeFactory.eINSTANCE
					.createEdge();

			// create object applicationNode__attribute__androidPlayLibraryPathAttr
			applicationNode__attribute__androidPlayLibraryPathAttr = TGGRuntimeFactory.eINSTANCE
					.createEdge();

			// create object applicationNode__attribute__packageNameAttr
			applicationNode__attribute__packageNameAttr = TGGRuntimeFactory.eINSTANCE
					.createEdge();

			// create object mApplicationToApplication__source__applicationNode
			mApplicationToApplication__source__applicationNode = TGGRuntimeFactory.eINSTANCE
					.createEdge();

			// assign attribute applicationNode__attribute__titleAttr
			applicationNode__attribute__titleAttr.setName("attribute");
			// assign attribute applicationNode__attribute__packageNameAttr
			applicationNode__attribute__packageNameAttr.setName("attribute");
			// assign attribute applicationNode__attribute__androidPlayLibraryPathAttr
			applicationNode__attribute__androidPlayLibraryPathAttr
					.setName("attribute");
			// assign attribute applicationNode__attribute__androidMapsApiKeyAttr
			applicationNode__attribute__androidMapsApiKeyAttr
					.setName("attribute");
			// assign attribute mApplicationToApplication__source__applicationNode
			mApplicationToApplication__source__applicationNode
					.setName("source");
			// assign attribute mApplicationToApplication__target__application
			mApplicationToApplication__target__application.setName("target");

			// create link
			org.moflon.util.eMoflonEMFUtil.addOppositeReference(ruleresult,
					applicationNode__attribute__titleAttr, "translatedEdges");

			// create link
			org.moflon.util.eMoflonEMFUtil.addOppositeReference(ruleresult,
					applicationNode__attribute__androidMapsApiKeyAttr,
					"translatedEdges");

			// create link
			org.moflon.util.eMoflonEMFUtil.addOppositeReference(ruleresult,
					mApplicationToApplication__target__application,
					"createdEdges");

			// create link
			org.moflon.util.eMoflonEMFUtil.addOppositeReference(ruleresult,
					applicationNode__attribute__androidPlayLibraryPathAttr,
					"translatedEdges");

			// create link
			org.moflon.util.eMoflonEMFUtil.addOppositeReference(ruleresult,
					applicationNode__attribute__packageNameAttr,
					"translatedEdges");

			// create link
			org.moflon.util.eMoflonEMFUtil.addOppositeReference(ruleresult,
					mApplicationToApplication__source__applicationNode,
					"createdEdges");

			// create link
			applicationNode__attribute__androidMapsApiKeyAttr
					.setSrc(applicationNode);

			// create link
			applicationNode__attribute__androidPlayLibraryPathAttr
					.setSrc(applicationNode);

			// create link
			mApplicationToApplication__source__applicationNode
					.setTrg(applicationNode);

			// create link
			applicationNode__attribute__packageNameAttr.setSrc(applicationNode);

			// create link
			applicationNode__attribute__titleAttr.setSrc(applicationNode);

			// create link
			applicationNode__attribute__titleAttr.setTrg(titleAttr);

			// create link
			applicationNode__attribute__packageNameAttr.setTrg(packageNameAttr);

			// create link
			applicationNode__attribute__androidPlayLibraryPathAttr
					.setTrg(androidPlayLibraryPathAttr);

			// create link
			applicationNode__attribute__androidMapsApiKeyAttr
					.setTrg(androidMapsApiKeyAttr);

			// create link
			mApplicationToApplication__source__applicationNode
					.setSrc(mApplicationToApplication);

			// create link
			mApplicationToApplication__target__application
					.setSrc(mApplicationToApplication);

			// create link
			mApplicationToApplication__target__application.setTrg(application);

			fujaba__Success = true;
		} catch (JavaSDMException fujaba__InternalException) {
			fujaba__Success = false;
		}

		// statement node 'perform postprocessing'
		// No post processing method found
		return ruleresult;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean isAppropriate_FWD(Match match, Node applicationNode,
			Attribute titleAttr, Attribute packageNameAttr,
			Attribute androidPlayLibraryPathAttr,
			Attribute androidMapsApiKeyAttr) {
		boolean fujaba__Success = false;
		Edge applicationNode__attribute__androidMapsApiKeyAttr = null;
		Edge applicationNode__attribute__androidPlayLibraryPathAttr = null;
		Edge applicationNode__attribute__titleAttr = null;
		Edge applicationNode__attribute__packageNameAttr = null;

		// statement node 'Solve CSP'
		// Create CSP
		CSP csp = CspFactory.eINSTANCE.createCSP();

		// Create literals

		// Create attribute variables

		// Create explicit parameters

		// Create unbound variables

		// Create constraints

		// Solve CSP

		// statement node 'Check CSP'
		fujaba__Success = csp.check();
		if (fujaba__Success) {
			// story node 'collect elements to be translated'
			try {
				fujaba__Success = false;

				// check object androidMapsApiKeyAttr is really bound
				JavaSDM.ensure(androidMapsApiKeyAttr != null);
				// check object androidPlayLibraryPathAttr is really bound
				JavaSDM.ensure(androidPlayLibraryPathAttr != null);
				// check object applicationNode is really bound
				JavaSDM.ensure(applicationNode != null);
				// check object match is really bound
				JavaSDM.ensure(match != null);
				// check object packageNameAttr is really bound
				JavaSDM.ensure(packageNameAttr != null);
				// check object titleAttr is really bound
				JavaSDM.ensure(titleAttr != null);
				// check isomorphic binding between objects androidPlayLibraryPathAttr and androidMapsApiKeyAttr 
				JavaSDM.ensure(!androidPlayLibraryPathAttr
						.equals(androidMapsApiKeyAttr));

				// check isomorphic binding between objects packageNameAttr and androidMapsApiKeyAttr 
				JavaSDM.ensure(!packageNameAttr.equals(androidMapsApiKeyAttr));

				// check isomorphic binding between objects titleAttr and androidMapsApiKeyAttr 
				JavaSDM.ensure(!titleAttr.equals(androidMapsApiKeyAttr));

				// check isomorphic binding between objects packageNameAttr and androidPlayLibraryPathAttr 
				JavaSDM.ensure(!packageNameAttr
						.equals(androidPlayLibraryPathAttr));

				// check isomorphic binding between objects titleAttr and androidPlayLibraryPathAttr 
				JavaSDM.ensure(!titleAttr.equals(androidPlayLibraryPathAttr));

				// check isomorphic binding between objects titleAttr and packageNameAttr 
				JavaSDM.ensure(!titleAttr.equals(packageNameAttr));

				// create object applicationNode__attribute__androidMapsApiKeyAttr
				applicationNode__attribute__androidMapsApiKeyAttr = TGGRuntimeFactory.eINSTANCE
						.createEdge();

				// create object applicationNode__attribute__androidPlayLibraryPathAttr
				applicationNode__attribute__androidPlayLibraryPathAttr = TGGRuntimeFactory.eINSTANCE
						.createEdge();

				// create object applicationNode__attribute__titleAttr
				applicationNode__attribute__titleAttr = TGGRuntimeFactory.eINSTANCE
						.createEdge();

				// create object applicationNode__attribute__packageNameAttr
				applicationNode__attribute__packageNameAttr = TGGRuntimeFactory.eINSTANCE
						.createEdge();

				// assign attribute applicationNode__attribute__titleAttr
				applicationNode__attribute__titleAttr.setName("attribute");
				// assign attribute applicationNode__attribute__packageNameAttr
				applicationNode__attribute__packageNameAttr
						.setName("attribute");
				// assign attribute applicationNode__attribute__androidPlayLibraryPathAttr
				applicationNode__attribute__androidPlayLibraryPathAttr
						.setName("attribute");
				// assign attribute applicationNode__attribute__androidMapsApiKeyAttr
				applicationNode__attribute__androidMapsApiKeyAttr
						.setName("attribute");

				// create link
				org.moflon.util.eMoflonEMFUtil.addOppositeReference(match,
						androidPlayLibraryPathAttr, "toBeTranslatedElements");

				// create link
				org.moflon.util.eMoflonEMFUtil.addOppositeReference(match,
						androidMapsApiKeyAttr, "toBeTranslatedElements");

				// create link
				org.moflon.util.eMoflonEMFUtil.addOppositeReference(match,
						applicationNode, "toBeTranslatedElements");

				// create link
				org.moflon.util.eMoflonEMFUtil.addOppositeReference(match,
						applicationNode__attribute__androidMapsApiKeyAttr,
						"toBeTranslatedEdges");

				// create link
				org.moflon.util.eMoflonEMFUtil.addOppositeReference(match,
						applicationNode__attribute__androidPlayLibraryPathAttr,
						"toBeTranslatedEdges");

				// create link
				org.moflon.util.eMoflonEMFUtil.addOppositeReference(match,
						applicationNode__attribute__titleAttr,
						"toBeTranslatedEdges");

				// create link
				org.moflon.util.eMoflonEMFUtil.addOppositeReference(match,
						titleAttr, "toBeTranslatedElements");

				// create link
				org.moflon.util.eMoflonEMFUtil.addOppositeReference(match,
						packageNameAttr, "toBeTranslatedElements");

				// create link
				org.moflon.util.eMoflonEMFUtil.addOppositeReference(match,
						applicationNode__attribute__packageNameAttr,
						"toBeTranslatedEdges");

				// create link
				applicationNode__attribute__androidMapsApiKeyAttr
						.setSrc(applicationNode);

				// create link
				applicationNode__attribute__androidPlayLibraryPathAttr
						.setSrc(applicationNode);

				// create link
				applicationNode__attribute__packageNameAttr
						.setSrc(applicationNode);

				// create link
				applicationNode__attribute__titleAttr.setSrc(applicationNode);

				// create link
				applicationNode__attribute__titleAttr.setTrg(titleAttr);

				// create link
				applicationNode__attribute__packageNameAttr
						.setTrg(packageNameAttr);

				// create link
				applicationNode__attribute__androidPlayLibraryPathAttr
						.setTrg(androidPlayLibraryPathAttr);

				// create link
				applicationNode__attribute__androidMapsApiKeyAttr
						.setTrg(androidMapsApiKeyAttr);

				fujaba__Success = true;
			} catch (JavaSDMException fujaba__InternalException) {
				fujaba__Success = false;
			}

			// story node 'collect context elements'
			try {
				fujaba__Success = false;

				// check object match is really bound
				JavaSDM.ensure(match != null);
				fujaba__Success = true;
			} catch (JavaSDMException fujaba__InternalException) {
				fujaba__Success = false;
			}

			// statement node 'register objects to match'
			match.registerObject("applicationNode", applicationNode);
			match.registerObject("titleAttr", titleAttr);
			match.registerObject("packageNameAttr", packageNameAttr);
			match.registerObject("androidPlayLibraryPathAttr",
					androidPlayLibraryPathAttr);
			match.registerObject("androidMapsApiKeyAttr", androidMapsApiKeyAttr);

			return true;

		} else {
			return false;

		}
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public IsApplicableRuleResult isApplicable_FWD(Match match) {
		boolean fujaba__Success = false;
		Object _TmpObject = null;
		EClass eClass = null;
		Iterator fujaba__IterEClassToPerformOperation = null;
		EOperation performOperation = null;
		IsApplicableRuleResult ruleresult = null;
		Attribute androidMapsApiKeyAttr = null;
		Attribute androidPlayLibraryPathAttr = null;
		Node applicationNode = null;
		Attribute packageNameAttr = null;
		Attribute titleAttr = null;
		IsApplicableMatch isApplicableMatch = null;

		// story node 'prepare return value'
		try {
			fujaba__Success = false;

			_TmpObject = (this.eClass());

			// ensure correct type and really bound of object eClass
			JavaSDM.ensure(_TmpObject instanceof EClass);
			eClass = (EClass) _TmpObject;
			// iterate to-many link eOperations from eClass to performOperation
			fujaba__Success = false;

			fujaba__IterEClassToPerformOperation = eClass.getEOperations()
					.iterator();

			while (!(fujaba__Success)
					&& fujaba__IterEClassToPerformOperation.hasNext()) {
				try {
					performOperation = (EOperation) fujaba__IterEClassToPerformOperation
							.next();

					// check object performOperation is really bound
					JavaSDM.ensure(performOperation != null);
					// attribute condition
					JavaSDM.ensure(JavaSDM.stringCompare(
							performOperation.getName(), "perform_FWD") == 0);

					fujaba__Success = true;
				} catch (JavaSDMException fujaba__InternalException) {
					fujaba__Success = false;
				}
			}
			JavaSDM.ensure(fujaba__Success);
			// create object ruleresult
			ruleresult = TGGRuntimeFactory.eINSTANCE
					.createIsApplicableRuleResult();

			// assign attribute ruleresult
			ruleresult.setSuccess(false);
			// assign attribute ruleresult
			ruleresult.setRule("MApplicationToApplicationRule");

			// create link
			org.moflon.util.eMoflonEMFUtil.addOppositeReference(ruleresult,
					performOperation, "performOperation");
			fujaba__Success = true;
		} catch (JavaSDMException fujaba__InternalException) {
			fujaba__Success = false;
		}

		// story node 'core match'
		try {
			fujaba__Success = false;

			_TmpObject = (match.getObject("androidMapsApiKeyAttr"));

			// ensure correct type and really bound of object androidMapsApiKeyAttr
			JavaSDM.ensure(_TmpObject instanceof Attribute);
			androidMapsApiKeyAttr = (Attribute) _TmpObject;
			_TmpObject = (match.getObject("androidPlayLibraryPathAttr"));

			// ensure correct type and really bound of object androidPlayLibraryPathAttr
			JavaSDM.ensure(_TmpObject instanceof Attribute);
			androidPlayLibraryPathAttr = (Attribute) _TmpObject;
			_TmpObject = (match.getObject("applicationNode"));

			// ensure correct type and really bound of object applicationNode
			JavaSDM.ensure(_TmpObject instanceof Node);
			applicationNode = (Node) _TmpObject;
			_TmpObject = (match.getObject("packageNameAttr"));

			// ensure correct type and really bound of object packageNameAttr
			JavaSDM.ensure(_TmpObject instanceof Attribute);
			packageNameAttr = (Attribute) _TmpObject;
			_TmpObject = (match.getObject("titleAttr"));

			// ensure correct type and really bound of object titleAttr
			JavaSDM.ensure(_TmpObject instanceof Attribute);
			titleAttr = (Attribute) _TmpObject;
			// check object match is really bound
			JavaSDM.ensure(match != null);
			// check isomorphic binding between objects androidPlayLibraryPathAttr and androidMapsApiKeyAttr 
			JavaSDM.ensure(!androidPlayLibraryPathAttr
					.equals(androidMapsApiKeyAttr));

			// check isomorphic binding between objects packageNameAttr and androidMapsApiKeyAttr 
			JavaSDM.ensure(!packageNameAttr.equals(androidMapsApiKeyAttr));

			// check isomorphic binding between objects titleAttr and androidMapsApiKeyAttr 
			JavaSDM.ensure(!titleAttr.equals(androidMapsApiKeyAttr));

			// check isomorphic binding between objects packageNameAttr and androidPlayLibraryPathAttr 
			JavaSDM.ensure(!packageNameAttr.equals(androidPlayLibraryPathAttr));

			// check isomorphic binding between objects titleAttr and androidPlayLibraryPathAttr 
			JavaSDM.ensure(!titleAttr.equals(androidPlayLibraryPathAttr));

			// check isomorphic binding between objects titleAttr and packageNameAttr 
			JavaSDM.ensure(!titleAttr.equals(packageNameAttr));

			// attribute condition
			JavaSDM.ensure(JavaSDM.stringCompare(applicationNode.getName(),
					"Application") == 0);

			// attribute condition
			JavaSDM.ensure(JavaSDM.stringCompare(
					androidMapsApiKeyAttr.getName(), "androidMapsApiKey") == 0);

			// attribute condition
			JavaSDM.ensure(JavaSDM.stringCompare(
					androidPlayLibraryPathAttr.getName(),
					"androidPlayLibraryPath") == 0);

			// attribute condition
			JavaSDM.ensure(JavaSDM.stringCompare(packageNameAttr.getName(),
					"packageName") == 0);

			// attribute condition
			JavaSDM.ensure(JavaSDM.stringCompare(titleAttr.getName(), "title") == 0);

			fujaba__Success = true;
		} catch (JavaSDMException fujaba__InternalException) {
			fujaba__Success = false;
		}

		// story node 'find context'
		try {
			fujaba__Success = false;

			// check object androidMapsApiKeyAttr is really bound
			JavaSDM.ensure(androidMapsApiKeyAttr != null);
			// check object androidPlayLibraryPathAttr is really bound
			JavaSDM.ensure(androidPlayLibraryPathAttr != null);
			// check object applicationNode is really bound
			JavaSDM.ensure(applicationNode != null);
			// check object packageNameAttr is really bound
			JavaSDM.ensure(packageNameAttr != null);
			// check object titleAttr is really bound
			JavaSDM.ensure(titleAttr != null);
			// check isomorphic binding between objects androidPlayLibraryPathAttr and androidMapsApiKeyAttr 
			JavaSDM.ensure(!androidPlayLibraryPathAttr
					.equals(androidMapsApiKeyAttr));

			// check isomorphic binding between objects packageNameAttr and androidMapsApiKeyAttr 
			JavaSDM.ensure(!packageNameAttr.equals(androidMapsApiKeyAttr));

			// check isomorphic binding between objects titleAttr and androidMapsApiKeyAttr 
			JavaSDM.ensure(!titleAttr.equals(androidMapsApiKeyAttr));

			// check isomorphic binding between objects packageNameAttr and androidPlayLibraryPathAttr 
			JavaSDM.ensure(!packageNameAttr.equals(androidPlayLibraryPathAttr));

			// check isomorphic binding between objects titleAttr and androidPlayLibraryPathAttr 
			JavaSDM.ensure(!titleAttr.equals(androidPlayLibraryPathAttr));

			// check isomorphic binding between objects titleAttr and packageNameAttr 
			JavaSDM.ensure(!titleAttr.equals(packageNameAttr));

			// check link attribute from androidMapsApiKeyAttr to applicationNode
			JavaSDM.ensure(applicationNode.equals(androidMapsApiKeyAttr
					.getNode()));

			// check link attribute from androidPlayLibraryPathAttr to applicationNode
			JavaSDM.ensure(applicationNode.equals(androidPlayLibraryPathAttr
					.getNode()));

			// check link attribute from packageNameAttr to applicationNode
			JavaSDM.ensure(applicationNode.equals(packageNameAttr.getNode()));

			// check link attribute from titleAttr to applicationNode
			JavaSDM.ensure(applicationNode.equals(titleAttr.getNode()));

			// attribute condition
			JavaSDM.ensure(JavaSDM.stringCompare(applicationNode.getName(),
					"Application") == 0);

			// attribute condition
			JavaSDM.ensure(JavaSDM.stringCompare(
					androidMapsApiKeyAttr.getName(), "androidMapsApiKey") == 0);

			// attribute condition
			JavaSDM.ensure(JavaSDM.stringCompare(
					androidPlayLibraryPathAttr.getName(),
					"androidPlayLibraryPath") == 0);

			// attribute condition
			JavaSDM.ensure(JavaSDM.stringCompare(packageNameAttr.getName(),
					"packageName") == 0);

			// attribute condition
			JavaSDM.ensure(JavaSDM.stringCompare(titleAttr.getName(), "title") == 0);

			// create object isApplicableMatch
			isApplicableMatch = TGGRuntimeFactory.eINSTANCE
					.createIsApplicableMatch();

			// statement node 'solve CSP'
			// Create CSP
			CSP csp = CspFactory.eINSTANCE.createCSP();
			isApplicableMatch.getAttributeInfo().add(csp);

			// Create literals

			// Create attribute variables
			Variable<String> var_titleAttr_value = CspFactory.eINSTANCE
					.createVariable("titleAttr.value", true, csp);
			var_titleAttr_value.setValue(titleAttr.getValue());
			Variable<String> var_packageNameAttr_value = CspFactory.eINSTANCE
					.createVariable("packageNameAttr.value", true, csp);
			var_packageNameAttr_value.setValue(packageNameAttr.getValue());
			Variable<String> var_androidPlayLibraryPathAttr_value = CspFactory.eINSTANCE
					.createVariable("androidPlayLibraryPathAttr.value", true,
							csp);
			var_androidPlayLibraryPathAttr_value
					.setValue(androidPlayLibraryPathAttr.getValue());
			Variable<String> var_androidMapsApiKeyAttr_value = CspFactory.eINSTANCE
					.createVariable("androidMapsApiKeyAttr.value", true, csp);
			var_androidMapsApiKeyAttr_value.setValue(androidMapsApiKeyAttr
					.getValue());

			// Create explicit parameters

			// Create unbound variables
			Variable<String> var_application_title = CspFactory.eINSTANCE
					.createVariable("application.title", csp);
			Variable<String> var_application_packageName = CspFactory.eINSTANCE
					.createVariable("application.packageName", csp);
			Variable<String> var_application_androidPlayLibraryPath = CspFactory.eINSTANCE
					.createVariable("application.androidPlayLibraryPath", csp);
			Variable<String> var_application_androidMapsApiKey = CspFactory.eINSTANCE
					.createVariable("application.androidMapsApiKey", csp);

			// Create constraints
			Eq<String> eq = new Eq<String>();
			Eq<String> eq_0 = new Eq<String>();
			Eq<String> eq_1 = new Eq<String>();
			Eq<String> eq_2 = new Eq<String>();

			csp.getConstraints().add(eq);
			csp.getConstraints().add(eq_0);
			csp.getConstraints().add(eq_1);
			csp.getConstraints().add(eq_2);

			// Solve CSP
			eq.setRuleName("");
			eq.solve(var_titleAttr_value, var_application_title);
			eq_0.setRuleName("");
			eq_0.solve(var_packageNameAttr_value, var_application_packageName);
			eq_1.setRuleName("");
			eq_1.solve(var_androidPlayLibraryPathAttr_value,
					var_application_androidPlayLibraryPath);
			eq_2.setRuleName("");
			eq_2.solve(var_androidMapsApiKeyAttr_value,
					var_application_androidMapsApiKey);

			// Snapshot pattern match on which CSP is solved
			isApplicableMatch
					.registerObject("applicationNode", applicationNode);
			isApplicableMatch.registerObject("titleAttr", titleAttr);
			isApplicableMatch
					.registerObject("packageNameAttr", packageNameAttr);
			isApplicableMatch.registerObject("androidPlayLibraryPathAttr",
					androidPlayLibraryPathAttr);
			isApplicableMatch.registerObject("androidMapsApiKeyAttr",
					androidMapsApiKeyAttr);

			// statement node 'check CSP'
			fujaba__Success = csp.check();
			if (fujaba__Success) {
				// story node 'add match to rule result'
				try {
					fujaba__Success = false;

					// check object isApplicableMatch is really bound
					JavaSDM.ensure(isApplicableMatch != null);
					// check object ruleresult is really bound
					JavaSDM.ensure(ruleresult != null);
					// assign attribute ruleresult
					ruleresult.setSuccess(true);

					// create link
					ruleresult.getIsApplicableMatch().add(isApplicableMatch);

					fujaba__Success = true;
				} catch (JavaSDMException fujaba__InternalException) {
					fujaba__Success = false;
				}

			} else {

			}
			fujaba__Success = true;
		} catch (JavaSDMException fujaba__InternalException) {
			fujaba__Success = false;
		}

		return ruleresult;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public PerformRuleResult perform_BWD(IsApplicableMatch isApplicableMatch) {
		boolean fujaba__Success = false;
		Object _TmpObject = null;
		BlipApplication application = null;
		Iterator fujaba__IterIsApplicableMatchToCsp = null;
		CSP csp = null;
		Node applicationNode = null;
		Attribute packageNameAttr = null;
		Attribute androidPlayLibraryPathAttr = null;
		Attribute titleAttr = null;
		Attribute androidMapsApiKeyAttr = null;
		MApplicationToApplication mApplicationToApplication = null;
		PerformRuleResult ruleresult = null;
		Edge applicationNode__attribute__packageNameAttr = null;
		Edge applicationNode__attribute__androidPlayLibraryPathAttr = null;
		Edge applicationNode__attribute__androidMapsApiKeyAttr = null;
		Edge mApplicationToApplication__target__application = null;
		Edge applicationNode__attribute__titleAttr = null;
		Edge mApplicationToApplication__source__applicationNode = null;

		// story node 'perform transformation'
		try {
			fujaba__Success = false;

			_TmpObject = (isApplicableMatch.getObject("application"));

			// ensure correct type and really bound of object application
			JavaSDM.ensure(_TmpObject instanceof BlipApplication);
			application = (BlipApplication) _TmpObject;
			// check object isApplicableMatch is really bound
			JavaSDM.ensure(isApplicableMatch != null);
			// iterate to-many link attributeInfo from isApplicableMatch to csp
			fujaba__Success = false;

			fujaba__IterIsApplicableMatchToCsp = isApplicableMatch
					.getAttributeInfo().iterator();

			while (!(fujaba__Success)
					&& fujaba__IterIsApplicableMatchToCsp.hasNext()) {
				try {
					_TmpObject = fujaba__IterIsApplicableMatchToCsp.next();

					// ensure correct type and really bound of object csp
					JavaSDM.ensure(_TmpObject instanceof CSP);
					csp = (CSP) _TmpObject;

					fujaba__Success = true;
				} catch (JavaSDMException fujaba__InternalException) {
					fujaba__Success = false;
				}
			}
			if (!fujaba__Success) {
				fujaba__Success = true;
				csp = null;
			}
			// create object applicationNode
			applicationNode = MocaTreeFactory.eINSTANCE.createNode();

			// create object packageNameAttr
			packageNameAttr = MocaTreeFactory.eINSTANCE.createAttribute();

			// create object androidPlayLibraryPathAttr
			androidPlayLibraryPathAttr = MocaTreeFactory.eINSTANCE
					.createAttribute();

			// create object titleAttr
			titleAttr = MocaTreeFactory.eINSTANCE.createAttribute();

			// create object androidMapsApiKeyAttr
			androidMapsApiKeyAttr = MocaTreeFactory.eINSTANCE.createAttribute();

			// create object mApplicationToApplication
			mApplicationToApplication = BlipTGGFactory.eINSTANCE
					.createMApplicationToApplication();

			// assign attribute applicationNode
			applicationNode.setName("Application");
			// assign attribute titleAttr
			titleAttr.setName("title");
			// assign attribute titleAttr
			titleAttr.setValue((java.lang.String) csp.getAttributeVariable(
					"titleAttr", "value").getValue());
			// assign attribute packageNameAttr
			packageNameAttr.setName("packageName");
			// assign attribute packageNameAttr
			packageNameAttr.setValue((java.lang.String) csp
					.getAttributeVariable("packageNameAttr", "value")
					.getValue());
			// assign attribute androidPlayLibraryPathAttr
			androidPlayLibraryPathAttr.setName("androidPlayLibraryPath");
			// assign attribute androidPlayLibraryPathAttr
			androidPlayLibraryPathAttr
					.setValue((java.lang.String) csp.getAttributeVariable(
							"androidPlayLibraryPathAttr", "value").getValue());
			// assign attribute androidMapsApiKeyAttr
			androidMapsApiKeyAttr.setName("androidMapsApiKey");
			// assign attribute androidMapsApiKeyAttr
			androidMapsApiKeyAttr.setValue((java.lang.String) csp
					.getAttributeVariable("androidMapsApiKeyAttr", "value")
					.getValue());

			// create link
			org.moflon.util.eMoflonEMFUtil.addOppositeReference(
					mApplicationToApplication, application, "target");

			// create link
			packageNameAttr.setNode(applicationNode);

			// create link
			androidPlayLibraryPathAttr.setNode(applicationNode);

			// create link
			titleAttr.setNode(applicationNode);

			// create link
			androidMapsApiKeyAttr.setNode(applicationNode);

			// create link
			mApplicationToApplication.setSource(applicationNode);

			fujaba__Success = true;
		} catch (JavaSDMException fujaba__InternalException) {
			fujaba__Success = false;
		}

		// story node 'collect translated elements'
		try {
			fujaba__Success = false;

			// check object androidMapsApiKeyAttr is really bound
			JavaSDM.ensure(androidMapsApiKeyAttr != null);
			// check object androidPlayLibraryPathAttr is really bound
			JavaSDM.ensure(androidPlayLibraryPathAttr != null);
			// check object application is really bound
			JavaSDM.ensure(application != null);
			// check object applicationNode is really bound
			JavaSDM.ensure(applicationNode != null);
			// check object mApplicationToApplication is really bound
			JavaSDM.ensure(mApplicationToApplication != null);
			// check object packageNameAttr is really bound
			JavaSDM.ensure(packageNameAttr != null);
			// check object titleAttr is really bound
			JavaSDM.ensure(titleAttr != null);
			// check isomorphic binding between objects androidPlayLibraryPathAttr and androidMapsApiKeyAttr 
			JavaSDM.ensure(!androidPlayLibraryPathAttr
					.equals(androidMapsApiKeyAttr));

			// check isomorphic binding between objects packageNameAttr and androidMapsApiKeyAttr 
			JavaSDM.ensure(!packageNameAttr.equals(androidMapsApiKeyAttr));

			// check isomorphic binding between objects titleAttr and androidMapsApiKeyAttr 
			JavaSDM.ensure(!titleAttr.equals(androidMapsApiKeyAttr));

			// check isomorphic binding between objects packageNameAttr and androidPlayLibraryPathAttr 
			JavaSDM.ensure(!packageNameAttr.equals(androidPlayLibraryPathAttr));

			// check isomorphic binding between objects titleAttr and androidPlayLibraryPathAttr 
			JavaSDM.ensure(!titleAttr.equals(androidPlayLibraryPathAttr));

			// check isomorphic binding between objects titleAttr and packageNameAttr 
			JavaSDM.ensure(!titleAttr.equals(packageNameAttr));

			// create object ruleresult
			ruleresult = TGGRuntimeFactory.eINSTANCE.createPerformRuleResult();

			// assign attribute ruleresult
			ruleresult.setSuccess(true);

			// create link
			org.moflon.util.eMoflonEMFUtil.addOppositeReference(ruleresult,
					mApplicationToApplication, "createdLinkElements");

			// create link
			org.moflon.util.eMoflonEMFUtil.addOppositeReference(ruleresult,
					applicationNode, "createdElements");

			// create link
			org.moflon.util.eMoflonEMFUtil.addOppositeReference(ruleresult,
					titleAttr, "createdElements");

			// create link
			org.moflon.util.eMoflonEMFUtil.addOppositeReference(ruleresult,
					androidMapsApiKeyAttr, "createdElements");

			// create link
			org.moflon.util.eMoflonEMFUtil.addOppositeReference(ruleresult,
					application, "translatedElements");

			// create link
			org.moflon.util.eMoflonEMFUtil.addOppositeReference(ruleresult,
					androidPlayLibraryPathAttr, "createdElements");

			// create link
			org.moflon.util.eMoflonEMFUtil.addOppositeReference(ruleresult,
					packageNameAttr, "createdElements");
			fujaba__Success = true;
		} catch (JavaSDMException fujaba__InternalException) {
			fujaba__Success = false;
		}

		// story node 'bookkeeping for edges'
		try {
			fujaba__Success = false;

			// check object androidMapsApiKeyAttr is really bound
			JavaSDM.ensure(androidMapsApiKeyAttr != null);
			// check object androidPlayLibraryPathAttr is really bound
			JavaSDM.ensure(androidPlayLibraryPathAttr != null);
			// check object application is really bound
			JavaSDM.ensure(application != null);
			// check object applicationNode is really bound
			JavaSDM.ensure(applicationNode != null);
			// check object mApplicationToApplication is really bound
			JavaSDM.ensure(mApplicationToApplication != null);
			// check object packageNameAttr is really bound
			JavaSDM.ensure(packageNameAttr != null);
			// check object ruleresult is really bound
			JavaSDM.ensure(ruleresult != null);
			// check object titleAttr is really bound
			JavaSDM.ensure(titleAttr != null);
			// check isomorphic binding between objects androidPlayLibraryPathAttr and androidMapsApiKeyAttr 
			JavaSDM.ensure(!androidPlayLibraryPathAttr
					.equals(androidMapsApiKeyAttr));

			// check isomorphic binding between objects application and androidMapsApiKeyAttr 
			JavaSDM.ensure(!application.equals(androidMapsApiKeyAttr));

			// check isomorphic binding between objects applicationNode and androidMapsApiKeyAttr 
			JavaSDM.ensure(!applicationNode.equals(androidMapsApiKeyAttr));

			// check isomorphic binding between objects mApplicationToApplication and androidMapsApiKeyAttr 
			JavaSDM.ensure(!mApplicationToApplication
					.equals(androidMapsApiKeyAttr));

			// check isomorphic binding between objects packageNameAttr and androidMapsApiKeyAttr 
			JavaSDM.ensure(!packageNameAttr.equals(androidMapsApiKeyAttr));

			// check isomorphic binding between objects titleAttr and androidMapsApiKeyAttr 
			JavaSDM.ensure(!titleAttr.equals(androidMapsApiKeyAttr));

			// check isomorphic binding between objects application and androidPlayLibraryPathAttr 
			JavaSDM.ensure(!application.equals(androidPlayLibraryPathAttr));

			// check isomorphic binding between objects applicationNode and androidPlayLibraryPathAttr 
			JavaSDM.ensure(!applicationNode.equals(androidPlayLibraryPathAttr));

			// check isomorphic binding between objects mApplicationToApplication and androidPlayLibraryPathAttr 
			JavaSDM.ensure(!mApplicationToApplication
					.equals(androidPlayLibraryPathAttr));

			// check isomorphic binding between objects packageNameAttr and androidPlayLibraryPathAttr 
			JavaSDM.ensure(!packageNameAttr.equals(androidPlayLibraryPathAttr));

			// check isomorphic binding between objects titleAttr and androidPlayLibraryPathAttr 
			JavaSDM.ensure(!titleAttr.equals(androidPlayLibraryPathAttr));

			// check isomorphic binding between objects applicationNode and application 
			JavaSDM.ensure(!applicationNode.equals(application));

			// check isomorphic binding between objects mApplicationToApplication and application 
			JavaSDM.ensure(!mApplicationToApplication.equals(application));

			// check isomorphic binding between objects packageNameAttr and application 
			JavaSDM.ensure(!packageNameAttr.equals(application));

			// check isomorphic binding between objects titleAttr and application 
			JavaSDM.ensure(!titleAttr.equals(application));

			// check isomorphic binding between objects mApplicationToApplication and applicationNode 
			JavaSDM.ensure(!mApplicationToApplication.equals(applicationNode));

			// check isomorphic binding between objects packageNameAttr and applicationNode 
			JavaSDM.ensure(!packageNameAttr.equals(applicationNode));

			// check isomorphic binding between objects titleAttr and applicationNode 
			JavaSDM.ensure(!titleAttr.equals(applicationNode));

			// check isomorphic binding between objects packageNameAttr and mApplicationToApplication 
			JavaSDM.ensure(!packageNameAttr.equals(mApplicationToApplication));

			// check isomorphic binding between objects titleAttr and mApplicationToApplication 
			JavaSDM.ensure(!titleAttr.equals(mApplicationToApplication));

			// check isomorphic binding between objects titleAttr and packageNameAttr 
			JavaSDM.ensure(!titleAttr.equals(packageNameAttr));

			// create object applicationNode__attribute__packageNameAttr
			applicationNode__attribute__packageNameAttr = TGGRuntimeFactory.eINSTANCE
					.createEdge();

			// create object applicationNode__attribute__androidPlayLibraryPathAttr
			applicationNode__attribute__androidPlayLibraryPathAttr = TGGRuntimeFactory.eINSTANCE
					.createEdge();

			// create object applicationNode__attribute__androidMapsApiKeyAttr
			applicationNode__attribute__androidMapsApiKeyAttr = TGGRuntimeFactory.eINSTANCE
					.createEdge();

			// create object mApplicationToApplication__target__application
			mApplicationToApplication__target__application = TGGRuntimeFactory.eINSTANCE
					.createEdge();

			// create object applicationNode__attribute__titleAttr
			applicationNode__attribute__titleAttr = TGGRuntimeFactory.eINSTANCE
					.createEdge();

			// create object mApplicationToApplication__source__applicationNode
			mApplicationToApplication__source__applicationNode = TGGRuntimeFactory.eINSTANCE
					.createEdge();

			// assign attribute applicationNode__attribute__titleAttr
			applicationNode__attribute__titleAttr.setName("attribute");
			// assign attribute applicationNode__attribute__packageNameAttr
			applicationNode__attribute__packageNameAttr.setName("attribute");
			// assign attribute applicationNode__attribute__androidPlayLibraryPathAttr
			applicationNode__attribute__androidPlayLibraryPathAttr
					.setName("attribute");
			// assign attribute applicationNode__attribute__androidMapsApiKeyAttr
			applicationNode__attribute__androidMapsApiKeyAttr
					.setName("attribute");
			// assign attribute mApplicationToApplication__source__applicationNode
			mApplicationToApplication__source__applicationNode
					.setName("source");
			// assign attribute mApplicationToApplication__target__application
			mApplicationToApplication__target__application.setName("target");

			// create link
			org.moflon.util.eMoflonEMFUtil
					.addOppositeReference(ruleresult,
							applicationNode__attribute__packageNameAttr,
							"createdEdges");

			// create link
			org.moflon.util.eMoflonEMFUtil.addOppositeReference(ruleresult,
					applicationNode__attribute__androidPlayLibraryPathAttr,
					"createdEdges");

			// create link
			org.moflon.util.eMoflonEMFUtil.addOppositeReference(ruleresult,
					applicationNode__attribute__androidMapsApiKeyAttr,
					"createdEdges");

			// create link
			org.moflon.util.eMoflonEMFUtil.addOppositeReference(ruleresult,
					mApplicationToApplication__target__application,
					"createdEdges");

			// create link
			org.moflon.util.eMoflonEMFUtil.addOppositeReference(ruleresult,
					applicationNode__attribute__titleAttr, "createdEdges");

			// create link
			org.moflon.util.eMoflonEMFUtil.addOppositeReference(ruleresult,
					mApplicationToApplication__source__applicationNode,
					"createdEdges");

			// create link
			applicationNode__attribute__androidMapsApiKeyAttr
					.setSrc(applicationNode);

			// create link
			applicationNode__attribute__packageNameAttr.setSrc(applicationNode);

			// create link
			applicationNode__attribute__titleAttr.setSrc(applicationNode);

			// create link
			mApplicationToApplication__source__applicationNode
					.setTrg(applicationNode);

			// create link
			applicationNode__attribute__androidPlayLibraryPathAttr
					.setSrc(applicationNode);

			// create link
			applicationNode__attribute__titleAttr.setTrg(titleAttr);

			// create link
			applicationNode__attribute__packageNameAttr.setTrg(packageNameAttr);

			// create link
			applicationNode__attribute__androidPlayLibraryPathAttr
					.setTrg(androidPlayLibraryPathAttr);

			// create link
			applicationNode__attribute__androidMapsApiKeyAttr
					.setTrg(androidMapsApiKeyAttr);

			// create link
			mApplicationToApplication__source__applicationNode
					.setSrc(mApplicationToApplication);

			// create link
			mApplicationToApplication__target__application
					.setSrc(mApplicationToApplication);

			// create link
			mApplicationToApplication__target__application.setTrg(application);

			fujaba__Success = true;
		} catch (JavaSDMException fujaba__InternalException) {
			fujaba__Success = false;
		}

		// statement node 'perform postprocessing'
		// No post processing method found
		return ruleresult;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean isAppropriate_BWD(Match match, BlipApplication application) {
		boolean fujaba__Success = false;

		// statement node 'Solve CSP'
		// Create CSP
		CSP csp = CspFactory.eINSTANCE.createCSP();

		// Create literals

		// Create attribute variables

		// Create explicit parameters

		// Create unbound variables

		// Create constraints

		// Solve CSP

		// statement node 'Check CSP'
		fujaba__Success = csp.check();
		if (fujaba__Success) {
			// story node 'collect elements to be translated'
			try {
				fujaba__Success = false;

				// check object application is really bound
				JavaSDM.ensure(application != null);
				// check object match is really bound
				JavaSDM.ensure(match != null);

				// create link
				org.moflon.util.eMoflonEMFUtil.addOppositeReference(match,
						application, "toBeTranslatedElements");
				fujaba__Success = true;
			} catch (JavaSDMException fujaba__InternalException) {
				fujaba__Success = false;
			}

			// story node 'collect context elements'
			try {
				fujaba__Success = false;

				// check object match is really bound
				JavaSDM.ensure(match != null);
				fujaba__Success = true;
			} catch (JavaSDMException fujaba__InternalException) {
				fujaba__Success = false;
			}

			// statement node 'register objects to match'
			match.registerObject("application", application);

			return true;

		} else {
			return false;

		}
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public IsApplicableRuleResult isApplicable_BWD(Match match) {
		boolean fujaba__Success = false;
		Object _TmpObject = null;
		EClass eClass = null;
		Iterator fujaba__IterEClassToPerformOperation = null;
		EOperation performOperation = null;
		IsApplicableRuleResult ruleresult = null;
		BlipApplication application = null;
		IsApplicableMatch isApplicableMatch = null;

		// story node 'prepare return value'
		try {
			fujaba__Success = false;

			_TmpObject = (this.eClass());

			// ensure correct type and really bound of object eClass
			JavaSDM.ensure(_TmpObject instanceof EClass);
			eClass = (EClass) _TmpObject;
			// iterate to-many link eOperations from eClass to performOperation
			fujaba__Success = false;

			fujaba__IterEClassToPerformOperation = eClass.getEOperations()
					.iterator();

			while (!(fujaba__Success)
					&& fujaba__IterEClassToPerformOperation.hasNext()) {
				try {
					performOperation = (EOperation) fujaba__IterEClassToPerformOperation
							.next();

					// check object performOperation is really bound
					JavaSDM.ensure(performOperation != null);
					// attribute condition
					JavaSDM.ensure(JavaSDM.stringCompare(
							performOperation.getName(), "perform_BWD") == 0);

					fujaba__Success = true;
				} catch (JavaSDMException fujaba__InternalException) {
					fujaba__Success = false;
				}
			}
			JavaSDM.ensure(fujaba__Success);
			// create object ruleresult
			ruleresult = TGGRuntimeFactory.eINSTANCE
					.createIsApplicableRuleResult();

			// assign attribute ruleresult
			ruleresult.setSuccess(false);
			// assign attribute ruleresult
			ruleresult.setRule("MApplicationToApplicationRule");

			// create link
			org.moflon.util.eMoflonEMFUtil.addOppositeReference(ruleresult,
					performOperation, "performOperation");
			fujaba__Success = true;
		} catch (JavaSDMException fujaba__InternalException) {
			fujaba__Success = false;
		}

		// story node 'core match'
		try {
			fujaba__Success = false;

			_TmpObject = (match.getObject("application"));

			// ensure correct type and really bound of object application
			JavaSDM.ensure(_TmpObject instanceof BlipApplication);
			application = (BlipApplication) _TmpObject;
			// check object match is really bound
			JavaSDM.ensure(match != null);
			fujaba__Success = true;
		} catch (JavaSDMException fujaba__InternalException) {
			fujaba__Success = false;
		}

		// story node 'find context'
		try {
			fujaba__Success = false;

			// check object application is really bound
			JavaSDM.ensure(application != null);
			// create object isApplicableMatch
			isApplicableMatch = TGGRuntimeFactory.eINSTANCE
					.createIsApplicableMatch();

			// statement node 'solve CSP'
			// Create CSP
			CSP csp = CspFactory.eINSTANCE.createCSP();
			isApplicableMatch.getAttributeInfo().add(csp);

			// Create literals

			// Create attribute variables
			Variable<String> var_application_title = CspFactory.eINSTANCE
					.createVariable("application.title", true, csp);
			var_application_title.setValue(application.getTitle());
			Variable<String> var_application_packageName = CspFactory.eINSTANCE
					.createVariable("application.packageName", true, csp);
			var_application_packageName.setValue(application.getPackageName());
			Variable<String> var_application_androidPlayLibraryPath = CspFactory.eINSTANCE
					.createVariable("application.androidPlayLibraryPath", true,
							csp);
			var_application_androidPlayLibraryPath.setValue(application
					.getAndroidPlayLibraryPath());
			Variable<String> var_application_androidMapsApiKey = CspFactory.eINSTANCE
					.createVariable("application.androidMapsApiKey", true, csp);
			var_application_androidMapsApiKey.setValue(application
					.getAndroidMapsApiKey());

			// Create explicit parameters

			// Create unbound variables
			Variable<String> var_titleAttr_value = CspFactory.eINSTANCE
					.createVariable("titleAttr.value", csp);
			Variable<String> var_packageNameAttr_value = CspFactory.eINSTANCE
					.createVariable("packageNameAttr.value", csp);
			Variable<String> var_androidPlayLibraryPathAttr_value = CspFactory.eINSTANCE
					.createVariable("androidPlayLibraryPathAttr.value", csp);
			Variable<String> var_androidMapsApiKeyAttr_value = CspFactory.eINSTANCE
					.createVariable("androidMapsApiKeyAttr.value", csp);

			// Create constraints
			Eq<String> eq = new Eq<String>();
			Eq<String> eq_0 = new Eq<String>();
			Eq<String> eq_1 = new Eq<String>();
			Eq<String> eq_2 = new Eq<String>();

			csp.getConstraints().add(eq);
			csp.getConstraints().add(eq_0);
			csp.getConstraints().add(eq_1);
			csp.getConstraints().add(eq_2);

			// Solve CSP
			eq.setRuleName("");
			eq.solve(var_titleAttr_value, var_application_title);
			eq_0.setRuleName("");
			eq_0.solve(var_packageNameAttr_value, var_application_packageName);
			eq_1.setRuleName("");
			eq_1.solve(var_androidPlayLibraryPathAttr_value,
					var_application_androidPlayLibraryPath);
			eq_2.setRuleName("");
			eq_2.solve(var_androidMapsApiKeyAttr_value,
					var_application_androidMapsApiKey);

			// Snapshot pattern match on which CSP is solved
			isApplicableMatch.registerObject("application", application);

			// statement node 'check CSP'
			fujaba__Success = csp.check();
			if (fujaba__Success) {
				// story node 'add match to rule result'
				try {
					fujaba__Success = false;

					// check object isApplicableMatch is really bound
					JavaSDM.ensure(isApplicableMatch != null);
					// check object ruleresult is really bound
					JavaSDM.ensure(ruleresult != null);
					// assign attribute ruleresult
					ruleresult.setSuccess(true);

					// create link
					ruleresult.getIsApplicableMatch().add(isApplicableMatch);

					fujaba__Success = true;
				} catch (JavaSDMException fujaba__InternalException) {
					fujaba__Success = false;
				}

			} else {

			}
			fujaba__Success = true;
		} catch (JavaSDMException fujaba__InternalException) {
			fujaba__Success = false;
		}

		return ruleresult;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public IsAppropriateRuleResult isAppropriate_FWD_Node_0(Node applicationNode) {
		boolean fujaba__Success = false;
		Object _TmpObject = null;
		EClass eClass = null;
		Iterator fujaba__IterEClassToPerformOperation = null;
		EOperation performOperation = null;
		IsAppropriateRuleResult ruleresult = null;
		Match match = null;
		Iterator fujaba__IterApplicationNodeToTitleAttr = null;
		Attribute titleAttr = null;
		Iterator fujaba__IterApplicationNodeToPackageNameAttr = null;
		Attribute packageNameAttr = null;
		Iterator fujaba__IterApplicationNodeToAndroidPlayLibraryPathAttr = null;
		Attribute androidPlayLibraryPathAttr = null;
		Iterator fujaba__IterApplicationNodeToAndroidMapsApiKeyAttr = null;
		Attribute androidMapsApiKeyAttr = null;
		Iterator fujaba__IterRuleresultToMatch = null;

		// story node 'prepare return value'
		try {
			fujaba__Success = false;

			_TmpObject = (this.eClass());

			// ensure correct type and really bound of object eClass
			JavaSDM.ensure(_TmpObject instanceof EClass);
			eClass = (EClass) _TmpObject;
			// iterate to-many link eOperations from eClass to performOperation
			fujaba__Success = false;

			fujaba__IterEClassToPerformOperation = eClass.getEOperations()
					.iterator();

			while (!(fujaba__Success)
					&& fujaba__IterEClassToPerformOperation.hasNext()) {
				try {
					performOperation = (EOperation) fujaba__IterEClassToPerformOperation
							.next();

					// check object performOperation is really bound
					JavaSDM.ensure(performOperation != null);
					// attribute condition
					JavaSDM.ensure(JavaSDM.stringCompare(
							performOperation.getName(), "isApplicable_FWD") == 0);

					fujaba__Success = true;
				} catch (JavaSDMException fujaba__InternalException) {
					fujaba__Success = false;
				}
			}
			JavaSDM.ensure(fujaba__Success);
			// create object ruleresult
			ruleresult = TGGRuntimeFactory.eINSTANCE
					.createIsAppropriateRuleResult();

			// assign attribute ruleresult
			ruleresult.setSuccess(false);

			// create link
			ruleresult.setPerformOperation(performOperation);

			fujaba__Success = true;
		} catch (JavaSDMException fujaba__InternalException) {
			fujaba__Success = false;
		}

		// story node 'test core match'
		try {
			fujaba__Success = false;

			// check object applicationNode is really bound
			JavaSDM.ensure(applicationNode != null);
			// check object ruleresult is really bound
			JavaSDM.ensure(ruleresult != null);
			// iterate to-many link attribute from applicationNode to androidMapsApiKeyAttr
			fujaba__Success = false;

			fujaba__IterApplicationNodeToAndroidMapsApiKeyAttr = new ArrayList(
					applicationNode.getAttribute()).iterator();

			while (fujaba__IterApplicationNodeToAndroidMapsApiKeyAttr.hasNext()) {
				try {
					androidMapsApiKeyAttr = (Attribute) fujaba__IterApplicationNodeToAndroidMapsApiKeyAttr
							.next();

					// check object androidMapsApiKeyAttr is really bound
					JavaSDM.ensure(androidMapsApiKeyAttr != null);
					// iterate to-many link attribute from applicationNode to androidPlayLibraryPathAttr
					fujaba__Success = false;

					fujaba__IterApplicationNodeToAndroidPlayLibraryPathAttr = new ArrayList(
							applicationNode.getAttribute()).iterator();

					while (fujaba__IterApplicationNodeToAndroidPlayLibraryPathAttr
							.hasNext()) {
						try {
							androidPlayLibraryPathAttr = (Attribute) fujaba__IterApplicationNodeToAndroidPlayLibraryPathAttr
									.next();

							// check object androidPlayLibraryPathAttr is really bound
							JavaSDM.ensure(androidPlayLibraryPathAttr != null);
							// check isomorphic binding between objects androidPlayLibraryPathAttr and androidMapsApiKeyAttr 
							JavaSDM.ensure(!androidPlayLibraryPathAttr
									.equals(androidMapsApiKeyAttr));

							// iterate to-many link attribute from applicationNode to packageNameAttr
							fujaba__Success = false;

							fujaba__IterApplicationNodeToPackageNameAttr = new ArrayList(
									applicationNode.getAttribute()).iterator();

							while (fujaba__IterApplicationNodeToPackageNameAttr
									.hasNext()) {
								try {
									packageNameAttr = (Attribute) fujaba__IterApplicationNodeToPackageNameAttr
											.next();

									// check object packageNameAttr is really bound
									JavaSDM.ensure(packageNameAttr != null);
									// check isomorphic binding between objects packageNameAttr and androidMapsApiKeyAttr 
									JavaSDM.ensure(!packageNameAttr
											.equals(androidMapsApiKeyAttr));

									// check isomorphic binding between objects packageNameAttr and androidPlayLibraryPathAttr 
									JavaSDM.ensure(!packageNameAttr
											.equals(androidPlayLibraryPathAttr));

									// iterate to-many link attribute from applicationNode to titleAttr
									fujaba__Success = false;

									fujaba__IterApplicationNodeToTitleAttr = new ArrayList(
											applicationNode.getAttribute())
											.iterator();

									while (fujaba__IterApplicationNodeToTitleAttr
											.hasNext()) {
										try {
											titleAttr = (Attribute) fujaba__IterApplicationNodeToTitleAttr
													.next();

											// check object titleAttr is really bound
											JavaSDM.ensure(titleAttr != null);
											// check isomorphic binding between objects titleAttr and androidMapsApiKeyAttr 
											JavaSDM.ensure(!titleAttr
													.equals(androidMapsApiKeyAttr));

											// check isomorphic binding between objects titleAttr and androidPlayLibraryPathAttr 
											JavaSDM.ensure(!titleAttr
													.equals(androidPlayLibraryPathAttr));

											// check isomorphic binding between objects titleAttr and packageNameAttr 
											JavaSDM.ensure(!titleAttr
													.equals(packageNameAttr));

											// attribute condition
											JavaSDM.ensure(JavaSDM
													.stringCompare(
															applicationNode
																	.getName(),
															"Application") == 0);

											// attribute condition
											JavaSDM.ensure(JavaSDM.stringCompare(
													androidMapsApiKeyAttr
															.getName(),
													"androidMapsApiKey") == 0);

											// attribute condition
											JavaSDM.ensure(JavaSDM.stringCompare(
													androidPlayLibraryPathAttr
															.getName(),
													"androidPlayLibraryPath") == 0);

											// attribute condition
											JavaSDM.ensure(JavaSDM
													.stringCompare(
															packageNameAttr
																	.getName(),
															"packageName") == 0);

											// attribute condition
											JavaSDM.ensure(JavaSDM.stringCompare(
													titleAttr.getName(),
													"title") == 0);

											// create object match
											match = TGGRuntimeFactory.eINSTANCE
													.createMatch();

											// statement node 'bookkeeping with generic isAppropriate method'
											fujaba__Success = this
													.isAppropriate_FWD(
															match,
															applicationNode,
															titleAttr,
															packageNameAttr,
															androidPlayLibraryPathAttr,
															androidMapsApiKeyAttr);
											if (fujaba__Success) {
												// story node 'Add match to rule result'
												try {
													fujaba__Success = false;

													// check object match is really bound
													JavaSDM.ensure(match != null);
													// check object ruleresult is really bound
													JavaSDM.ensure(ruleresult != null);

													// create link
													ruleresult.getMatches()
															.add(match);

													fujaba__Success = true;
												} catch (JavaSDMException fujaba__InternalException) {
													fujaba__Success = false;
												}

											} else {

											}

											fujaba__Success = true;
										} catch (JavaSDMException fujaba__InternalException) {
											fujaba__Success = false;
										}
									}
									JavaSDM.ensure(fujaba__Success);

									fujaba__Success = true;
								} catch (JavaSDMException fujaba__InternalException) {
									fujaba__Success = false;
								}
							}
							JavaSDM.ensure(fujaba__Success);

							fujaba__Success = true;
						} catch (JavaSDMException fujaba__InternalException) {
							fujaba__Success = false;
						}
					}
					JavaSDM.ensure(fujaba__Success);

					fujaba__Success = true;
				} catch (JavaSDMException fujaba__InternalException) {
					fujaba__Success = false;
				}
			}
			JavaSDM.ensure(fujaba__Success);
			fujaba__Success = true;
		} catch (JavaSDMException fujaba__InternalException) {
			fujaba__Success = false;
		}

		// story node 'set success'
		try {
			fujaba__Success = false;

			// check object ruleresult is really bound
			JavaSDM.ensure(ruleresult != null);
			// iterate to-many link matches from ruleresult to match
			fujaba__Success = false;

			fujaba__IterRuleresultToMatch = ruleresult.getMatches().iterator();

			while (!(fujaba__Success)
					&& fujaba__IterRuleresultToMatch.hasNext()) {
				try {
					match = (Match) fujaba__IterRuleresultToMatch.next();

					// check object match is really bound
					JavaSDM.ensure(match != null);

					fujaba__Success = true;
				} catch (JavaSDMException fujaba__InternalException) {
					fujaba__Success = false;
				}
			}
			JavaSDM.ensure(fujaba__Success);
			// assign attribute ruleresult
			ruleresult.setSuccess(true);
			fujaba__Success = true;
		} catch (JavaSDMException fujaba__InternalException) {
			fujaba__Success = false;
		}

		return ruleresult;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public IsAppropriateRuleResult isAppropriate_FWD_Attribute_0(
			Attribute titleAttr) {
		boolean fujaba__Success = false;
		Object _TmpObject = null;
		EClass eClass = null;
		Iterator fujaba__IterEClassToPerformOperation = null;
		EOperation performOperation = null;
		IsAppropriateRuleResult ruleresult = null;
		Match match = null;
		Iterator fujaba__IterApplicationNodeToPackageNameAttr = null;
		Attribute packageNameAttr = null;
		Iterator fujaba__IterApplicationNodeToAndroidPlayLibraryPathAttr = null;
		Attribute androidPlayLibraryPathAttr = null;
		Iterator fujaba__IterApplicationNodeToAndroidMapsApiKeyAttr = null;
		Attribute androidMapsApiKeyAttr = null;
		Node applicationNode = null;
		Iterator fujaba__IterRuleresultToMatch = null;

		// story node 'prepare return value'
		try {
			fujaba__Success = false;

			_TmpObject = (this.eClass());

			// ensure correct type and really bound of object eClass
			JavaSDM.ensure(_TmpObject instanceof EClass);
			eClass = (EClass) _TmpObject;
			// iterate to-many link eOperations from eClass to performOperation
			fujaba__Success = false;

			fujaba__IterEClassToPerformOperation = eClass.getEOperations()
					.iterator();

			while (!(fujaba__Success)
					&& fujaba__IterEClassToPerformOperation.hasNext()) {
				try {
					performOperation = (EOperation) fujaba__IterEClassToPerformOperation
							.next();

					// check object performOperation is really bound
					JavaSDM.ensure(performOperation != null);
					// attribute condition
					JavaSDM.ensure(JavaSDM.stringCompare(
							performOperation.getName(), "isApplicable_FWD") == 0);

					fujaba__Success = true;
				} catch (JavaSDMException fujaba__InternalException) {
					fujaba__Success = false;
				}
			}
			JavaSDM.ensure(fujaba__Success);
			// create object ruleresult
			ruleresult = TGGRuntimeFactory.eINSTANCE
					.createIsAppropriateRuleResult();

			// assign attribute ruleresult
			ruleresult.setSuccess(false);

			// create link
			ruleresult.setPerformOperation(performOperation);

			fujaba__Success = true;
		} catch (JavaSDMException fujaba__InternalException) {
			fujaba__Success = false;
		}

		// story node 'test core match'
		try {
			fujaba__Success = false;

			// check object ruleresult is really bound
			JavaSDM.ensure(ruleresult != null);
			// check object titleAttr is really bound
			JavaSDM.ensure(titleAttr != null);
			// bind object
			applicationNode = titleAttr.getNode();

			// check object applicationNode is really bound
			JavaSDM.ensure(applicationNode != null);

			// iterate to-many link attribute from applicationNode to androidMapsApiKeyAttr
			fujaba__Success = false;

			fujaba__IterApplicationNodeToAndroidMapsApiKeyAttr = new ArrayList(
					applicationNode.getAttribute()).iterator();

			while (fujaba__IterApplicationNodeToAndroidMapsApiKeyAttr.hasNext()) {
				try {
					androidMapsApiKeyAttr = (Attribute) fujaba__IterApplicationNodeToAndroidMapsApiKeyAttr
							.next();

					// check object androidMapsApiKeyAttr is really bound
					JavaSDM.ensure(androidMapsApiKeyAttr != null);
					// check isomorphic binding between objects titleAttr and androidMapsApiKeyAttr 
					JavaSDM.ensure(!titleAttr.equals(androidMapsApiKeyAttr));

					// iterate to-many link attribute from applicationNode to androidPlayLibraryPathAttr
					fujaba__Success = false;

					fujaba__IterApplicationNodeToAndroidPlayLibraryPathAttr = new ArrayList(
							applicationNode.getAttribute()).iterator();

					while (fujaba__IterApplicationNodeToAndroidPlayLibraryPathAttr
							.hasNext()) {
						try {
							androidPlayLibraryPathAttr = (Attribute) fujaba__IterApplicationNodeToAndroidPlayLibraryPathAttr
									.next();

							// check object androidPlayLibraryPathAttr is really bound
							JavaSDM.ensure(androidPlayLibraryPathAttr != null);
							// check isomorphic binding between objects androidPlayLibraryPathAttr and androidMapsApiKeyAttr 
							JavaSDM.ensure(!androidPlayLibraryPathAttr
									.equals(androidMapsApiKeyAttr));

							// check isomorphic binding between objects titleAttr and androidPlayLibraryPathAttr 
							JavaSDM.ensure(!titleAttr
									.equals(androidPlayLibraryPathAttr));

							// iterate to-many link attribute from applicationNode to packageNameAttr
							fujaba__Success = false;

							fujaba__IterApplicationNodeToPackageNameAttr = new ArrayList(
									applicationNode.getAttribute()).iterator();

							while (fujaba__IterApplicationNodeToPackageNameAttr
									.hasNext()) {
								try {
									packageNameAttr = (Attribute) fujaba__IterApplicationNodeToPackageNameAttr
											.next();

									// check object packageNameAttr is really bound
									JavaSDM.ensure(packageNameAttr != null);
									// check isomorphic binding between objects packageNameAttr and androidMapsApiKeyAttr 
									JavaSDM.ensure(!packageNameAttr
											.equals(androidMapsApiKeyAttr));

									// check isomorphic binding between objects packageNameAttr and androidPlayLibraryPathAttr 
									JavaSDM.ensure(!packageNameAttr
											.equals(androidPlayLibraryPathAttr));

									// check isomorphic binding between objects titleAttr and packageNameAttr 
									JavaSDM.ensure(!titleAttr
											.equals(packageNameAttr));

									// attribute condition
									JavaSDM.ensure(JavaSDM.stringCompare(
											applicationNode.getName(),
											"Application") == 0);

									// attribute condition
									JavaSDM.ensure(JavaSDM.stringCompare(
											androidMapsApiKeyAttr.getName(),
											"androidMapsApiKey") == 0);

									// attribute condition
									JavaSDM.ensure(JavaSDM.stringCompare(
											androidPlayLibraryPathAttr
													.getName(),
											"androidPlayLibraryPath") == 0);

									// attribute condition
									JavaSDM.ensure(JavaSDM.stringCompare(
											packageNameAttr.getName(),
											"packageName") == 0);

									// attribute condition
									JavaSDM.ensure(JavaSDM.stringCompare(
											titleAttr.getName(), "title") == 0);

									// create object match
									match = TGGRuntimeFactory.eINSTANCE
											.createMatch();

									// statement node 'bookkeeping with generic isAppropriate method'
									fujaba__Success = this.isAppropriate_FWD(
											match, applicationNode, titleAttr,
											packageNameAttr,
											androidPlayLibraryPathAttr,
											androidMapsApiKeyAttr);
									if (fujaba__Success) {
										// story node 'Add match to rule result'
										try {
											fujaba__Success = false;

											// check object match is really bound
											JavaSDM.ensure(match != null);
											// check object ruleresult is really bound
											JavaSDM.ensure(ruleresult != null);

											// create link
											ruleresult.getMatches().add(match);

											fujaba__Success = true;
										} catch (JavaSDMException fujaba__InternalException) {
											fujaba__Success = false;
										}

									} else {

									}

									fujaba__Success = true;
								} catch (JavaSDMException fujaba__InternalException) {
									fujaba__Success = false;
								}
							}
							JavaSDM.ensure(fujaba__Success);

							fujaba__Success = true;
						} catch (JavaSDMException fujaba__InternalException) {
							fujaba__Success = false;
						}
					}
					JavaSDM.ensure(fujaba__Success);

					fujaba__Success = true;
				} catch (JavaSDMException fujaba__InternalException) {
					fujaba__Success = false;
				}
			}
			JavaSDM.ensure(fujaba__Success);

			fujaba__Success = true;
		} catch (JavaSDMException fujaba__InternalException) {
			fujaba__Success = false;
		}

		// story node 'set success'
		try {
			fujaba__Success = false;

			// check object ruleresult is really bound
			JavaSDM.ensure(ruleresult != null);
			// iterate to-many link matches from ruleresult to match
			fujaba__Success = false;

			fujaba__IterRuleresultToMatch = ruleresult.getMatches().iterator();

			while (!(fujaba__Success)
					&& fujaba__IterRuleresultToMatch.hasNext()) {
				try {
					match = (Match) fujaba__IterRuleresultToMatch.next();

					// check object match is really bound
					JavaSDM.ensure(match != null);

					fujaba__Success = true;
				} catch (JavaSDMException fujaba__InternalException) {
					fujaba__Success = false;
				}
			}
			JavaSDM.ensure(fujaba__Success);
			// assign attribute ruleresult
			ruleresult.setSuccess(true);
			fujaba__Success = true;
		} catch (JavaSDMException fujaba__InternalException) {
			fujaba__Success = false;
		}

		return ruleresult;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public IsAppropriateRuleResult isAppropriate_FWD_Attribute_1(
			Attribute packageNameAttr) {
		boolean fujaba__Success = false;
		Object _TmpObject = null;
		EClass eClass = null;
		Iterator fujaba__IterEClassToPerformOperation = null;
		EOperation performOperation = null;
		IsAppropriateRuleResult ruleresult = null;
		Match match = null;
		Iterator fujaba__IterApplicationNodeToTitleAttr = null;
		Attribute titleAttr = null;
		Iterator fujaba__IterApplicationNodeToAndroidPlayLibraryPathAttr = null;
		Attribute androidPlayLibraryPathAttr = null;
		Iterator fujaba__IterApplicationNodeToAndroidMapsApiKeyAttr = null;
		Attribute androidMapsApiKeyAttr = null;
		Node applicationNode = null;
		Iterator fujaba__IterRuleresultToMatch = null;

		// story node 'prepare return value'
		try {
			fujaba__Success = false;

			_TmpObject = (this.eClass());

			// ensure correct type and really bound of object eClass
			JavaSDM.ensure(_TmpObject instanceof EClass);
			eClass = (EClass) _TmpObject;
			// iterate to-many link eOperations from eClass to performOperation
			fujaba__Success = false;

			fujaba__IterEClassToPerformOperation = eClass.getEOperations()
					.iterator();

			while (!(fujaba__Success)
					&& fujaba__IterEClassToPerformOperation.hasNext()) {
				try {
					performOperation = (EOperation) fujaba__IterEClassToPerformOperation
							.next();

					// check object performOperation is really bound
					JavaSDM.ensure(performOperation != null);
					// attribute condition
					JavaSDM.ensure(JavaSDM.stringCompare(
							performOperation.getName(), "isApplicable_FWD") == 0);

					fujaba__Success = true;
				} catch (JavaSDMException fujaba__InternalException) {
					fujaba__Success = false;
				}
			}
			JavaSDM.ensure(fujaba__Success);
			// create object ruleresult
			ruleresult = TGGRuntimeFactory.eINSTANCE
					.createIsAppropriateRuleResult();

			// assign attribute ruleresult
			ruleresult.setSuccess(false);

			// create link
			ruleresult.setPerformOperation(performOperation);

			fujaba__Success = true;
		} catch (JavaSDMException fujaba__InternalException) {
			fujaba__Success = false;
		}

		// story node 'test core match'
		try {
			fujaba__Success = false;

			// check object packageNameAttr is really bound
			JavaSDM.ensure(packageNameAttr != null);
			// check object ruleresult is really bound
			JavaSDM.ensure(ruleresult != null);
			// bind object
			applicationNode = packageNameAttr.getNode();

			// check object applicationNode is really bound
			JavaSDM.ensure(applicationNode != null);

			// iterate to-many link attribute from applicationNode to androidMapsApiKeyAttr
			fujaba__Success = false;

			fujaba__IterApplicationNodeToAndroidMapsApiKeyAttr = new ArrayList(
					applicationNode.getAttribute()).iterator();

			while (fujaba__IterApplicationNodeToAndroidMapsApiKeyAttr.hasNext()) {
				try {
					androidMapsApiKeyAttr = (Attribute) fujaba__IterApplicationNodeToAndroidMapsApiKeyAttr
							.next();

					// check object androidMapsApiKeyAttr is really bound
					JavaSDM.ensure(androidMapsApiKeyAttr != null);
					// check isomorphic binding between objects packageNameAttr and androidMapsApiKeyAttr 
					JavaSDM.ensure(!packageNameAttr
							.equals(androidMapsApiKeyAttr));

					// iterate to-many link attribute from applicationNode to androidPlayLibraryPathAttr
					fujaba__Success = false;

					fujaba__IterApplicationNodeToAndroidPlayLibraryPathAttr = new ArrayList(
							applicationNode.getAttribute()).iterator();

					while (fujaba__IterApplicationNodeToAndroidPlayLibraryPathAttr
							.hasNext()) {
						try {
							androidPlayLibraryPathAttr = (Attribute) fujaba__IterApplicationNodeToAndroidPlayLibraryPathAttr
									.next();

							// check object androidPlayLibraryPathAttr is really bound
							JavaSDM.ensure(androidPlayLibraryPathAttr != null);
							// check isomorphic binding between objects androidPlayLibraryPathAttr and androidMapsApiKeyAttr 
							JavaSDM.ensure(!androidPlayLibraryPathAttr
									.equals(androidMapsApiKeyAttr));

							// check isomorphic binding between objects packageNameAttr and androidPlayLibraryPathAttr 
							JavaSDM.ensure(!packageNameAttr
									.equals(androidPlayLibraryPathAttr));

							// iterate to-many link attribute from applicationNode to titleAttr
							fujaba__Success = false;

							fujaba__IterApplicationNodeToTitleAttr = new ArrayList(
									applicationNode.getAttribute()).iterator();

							while (fujaba__IterApplicationNodeToTitleAttr
									.hasNext()) {
								try {
									titleAttr = (Attribute) fujaba__IterApplicationNodeToTitleAttr
											.next();

									// check object titleAttr is really bound
									JavaSDM.ensure(titleAttr != null);
									// check isomorphic binding between objects titleAttr and androidMapsApiKeyAttr 
									JavaSDM.ensure(!titleAttr
											.equals(androidMapsApiKeyAttr));

									// check isomorphic binding between objects titleAttr and androidPlayLibraryPathAttr 
									JavaSDM.ensure(!titleAttr
											.equals(androidPlayLibraryPathAttr));

									// check isomorphic binding between objects titleAttr and packageNameAttr 
									JavaSDM.ensure(!titleAttr
											.equals(packageNameAttr));

									// attribute condition
									JavaSDM.ensure(JavaSDM.stringCompare(
											applicationNode.getName(),
											"Application") == 0);

									// attribute condition
									JavaSDM.ensure(JavaSDM.stringCompare(
											androidMapsApiKeyAttr.getName(),
											"androidMapsApiKey") == 0);

									// attribute condition
									JavaSDM.ensure(JavaSDM.stringCompare(
											androidPlayLibraryPathAttr
													.getName(),
											"androidPlayLibraryPath") == 0);

									// attribute condition
									JavaSDM.ensure(JavaSDM.stringCompare(
											packageNameAttr.getName(),
											"packageName") == 0);

									// attribute condition
									JavaSDM.ensure(JavaSDM.stringCompare(
											titleAttr.getName(), "title") == 0);

									// create object match
									match = TGGRuntimeFactory.eINSTANCE
											.createMatch();

									// statement node 'bookkeeping with generic isAppropriate method'
									fujaba__Success = this.isAppropriate_FWD(
											match, applicationNode, titleAttr,
											packageNameAttr,
											androidPlayLibraryPathAttr,
											androidMapsApiKeyAttr);
									if (fujaba__Success) {
										// story node 'Add match to rule result'
										try {
											fujaba__Success = false;

											// check object match is really bound
											JavaSDM.ensure(match != null);
											// check object ruleresult is really bound
											JavaSDM.ensure(ruleresult != null);

											// create link
											ruleresult.getMatches().add(match);

											fujaba__Success = true;
										} catch (JavaSDMException fujaba__InternalException) {
											fujaba__Success = false;
										}

									} else {

									}

									fujaba__Success = true;
								} catch (JavaSDMException fujaba__InternalException) {
									fujaba__Success = false;
								}
							}
							JavaSDM.ensure(fujaba__Success);

							fujaba__Success = true;
						} catch (JavaSDMException fujaba__InternalException) {
							fujaba__Success = false;
						}
					}
					JavaSDM.ensure(fujaba__Success);

					fujaba__Success = true;
				} catch (JavaSDMException fujaba__InternalException) {
					fujaba__Success = false;
				}
			}
			JavaSDM.ensure(fujaba__Success);

			fujaba__Success = true;
		} catch (JavaSDMException fujaba__InternalException) {
			fujaba__Success = false;
		}

		// story node 'set success'
		try {
			fujaba__Success = false;

			// check object ruleresult is really bound
			JavaSDM.ensure(ruleresult != null);
			// iterate to-many link matches from ruleresult to match
			fujaba__Success = false;

			fujaba__IterRuleresultToMatch = ruleresult.getMatches().iterator();

			while (!(fujaba__Success)
					&& fujaba__IterRuleresultToMatch.hasNext()) {
				try {
					match = (Match) fujaba__IterRuleresultToMatch.next();

					// check object match is really bound
					JavaSDM.ensure(match != null);

					fujaba__Success = true;
				} catch (JavaSDMException fujaba__InternalException) {
					fujaba__Success = false;
				}
			}
			JavaSDM.ensure(fujaba__Success);
			// assign attribute ruleresult
			ruleresult.setSuccess(true);
			fujaba__Success = true;
		} catch (JavaSDMException fujaba__InternalException) {
			fujaba__Success = false;
		}

		return ruleresult;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public IsAppropriateRuleResult isAppropriate_FWD_Attribute_2(
			Attribute androidPlayLibraryPathAttr) {
		boolean fujaba__Success = false;
		Object _TmpObject = null;
		EClass eClass = null;
		Iterator fujaba__IterEClassToPerformOperation = null;
		EOperation performOperation = null;
		IsAppropriateRuleResult ruleresult = null;
		Match match = null;
		Iterator fujaba__IterApplicationNodeToTitleAttr = null;
		Attribute titleAttr = null;
		Iterator fujaba__IterApplicationNodeToPackageNameAttr = null;
		Attribute packageNameAttr = null;
		Iterator fujaba__IterApplicationNodeToAndroidMapsApiKeyAttr = null;
		Attribute androidMapsApiKeyAttr = null;
		Node applicationNode = null;
		Iterator fujaba__IterRuleresultToMatch = null;

		// story node 'prepare return value'
		try {
			fujaba__Success = false;

			_TmpObject = (this.eClass());

			// ensure correct type and really bound of object eClass
			JavaSDM.ensure(_TmpObject instanceof EClass);
			eClass = (EClass) _TmpObject;
			// iterate to-many link eOperations from eClass to performOperation
			fujaba__Success = false;

			fujaba__IterEClassToPerformOperation = eClass.getEOperations()
					.iterator();

			while (!(fujaba__Success)
					&& fujaba__IterEClassToPerformOperation.hasNext()) {
				try {
					performOperation = (EOperation) fujaba__IterEClassToPerformOperation
							.next();

					// check object performOperation is really bound
					JavaSDM.ensure(performOperation != null);
					// attribute condition
					JavaSDM.ensure(JavaSDM.stringCompare(
							performOperation.getName(), "isApplicable_FWD") == 0);

					fujaba__Success = true;
				} catch (JavaSDMException fujaba__InternalException) {
					fujaba__Success = false;
				}
			}
			JavaSDM.ensure(fujaba__Success);
			// create object ruleresult
			ruleresult = TGGRuntimeFactory.eINSTANCE
					.createIsAppropriateRuleResult();

			// assign attribute ruleresult
			ruleresult.setSuccess(false);

			// create link
			ruleresult.setPerformOperation(performOperation);

			fujaba__Success = true;
		} catch (JavaSDMException fujaba__InternalException) {
			fujaba__Success = false;
		}

		// story node 'test core match'
		try {
			fujaba__Success = false;

			// check object androidPlayLibraryPathAttr is really bound
			JavaSDM.ensure(androidPlayLibraryPathAttr != null);
			// check object ruleresult is really bound
			JavaSDM.ensure(ruleresult != null);
			// bind object
			applicationNode = androidPlayLibraryPathAttr.getNode();

			// check object applicationNode is really bound
			JavaSDM.ensure(applicationNode != null);

			// iterate to-many link attribute from applicationNode to androidMapsApiKeyAttr
			fujaba__Success = false;

			fujaba__IterApplicationNodeToAndroidMapsApiKeyAttr = new ArrayList(
					applicationNode.getAttribute()).iterator();

			while (fujaba__IterApplicationNodeToAndroidMapsApiKeyAttr.hasNext()) {
				try {
					androidMapsApiKeyAttr = (Attribute) fujaba__IterApplicationNodeToAndroidMapsApiKeyAttr
							.next();

					// check object androidMapsApiKeyAttr is really bound
					JavaSDM.ensure(androidMapsApiKeyAttr != null);
					// check isomorphic binding between objects androidPlayLibraryPathAttr and androidMapsApiKeyAttr 
					JavaSDM.ensure(!androidPlayLibraryPathAttr
							.equals(androidMapsApiKeyAttr));

					// iterate to-many link attribute from applicationNode to packageNameAttr
					fujaba__Success = false;

					fujaba__IterApplicationNodeToPackageNameAttr = new ArrayList(
							applicationNode.getAttribute()).iterator();

					while (fujaba__IterApplicationNodeToPackageNameAttr
							.hasNext()) {
						try {
							packageNameAttr = (Attribute) fujaba__IterApplicationNodeToPackageNameAttr
									.next();

							// check object packageNameAttr is really bound
							JavaSDM.ensure(packageNameAttr != null);
							// check isomorphic binding between objects packageNameAttr and androidMapsApiKeyAttr 
							JavaSDM.ensure(!packageNameAttr
									.equals(androidMapsApiKeyAttr));

							// check isomorphic binding between objects packageNameAttr and androidPlayLibraryPathAttr 
							JavaSDM.ensure(!packageNameAttr
									.equals(androidPlayLibraryPathAttr));

							// iterate to-many link attribute from applicationNode to titleAttr
							fujaba__Success = false;

							fujaba__IterApplicationNodeToTitleAttr = new ArrayList(
									applicationNode.getAttribute()).iterator();

							while (fujaba__IterApplicationNodeToTitleAttr
									.hasNext()) {
								try {
									titleAttr = (Attribute) fujaba__IterApplicationNodeToTitleAttr
											.next();

									// check object titleAttr is really bound
									JavaSDM.ensure(titleAttr != null);
									// check isomorphic binding between objects titleAttr and androidMapsApiKeyAttr 
									JavaSDM.ensure(!titleAttr
											.equals(androidMapsApiKeyAttr));

									// check isomorphic binding between objects titleAttr and androidPlayLibraryPathAttr 
									JavaSDM.ensure(!titleAttr
											.equals(androidPlayLibraryPathAttr));

									// check isomorphic binding between objects titleAttr and packageNameAttr 
									JavaSDM.ensure(!titleAttr
											.equals(packageNameAttr));

									// attribute condition
									JavaSDM.ensure(JavaSDM.stringCompare(
											applicationNode.getName(),
											"Application") == 0);

									// attribute condition
									JavaSDM.ensure(JavaSDM.stringCompare(
											androidMapsApiKeyAttr.getName(),
											"androidMapsApiKey") == 0);

									// attribute condition
									JavaSDM.ensure(JavaSDM.stringCompare(
											androidPlayLibraryPathAttr
													.getName(),
											"androidPlayLibraryPath") == 0);

									// attribute condition
									JavaSDM.ensure(JavaSDM.stringCompare(
											packageNameAttr.getName(),
											"packageName") == 0);

									// attribute condition
									JavaSDM.ensure(JavaSDM.stringCompare(
											titleAttr.getName(), "title") == 0);

									// create object match
									match = TGGRuntimeFactory.eINSTANCE
											.createMatch();

									// statement node 'bookkeeping with generic isAppropriate method'
									fujaba__Success = this.isAppropriate_FWD(
											match, applicationNode, titleAttr,
											packageNameAttr,
											androidPlayLibraryPathAttr,
											androidMapsApiKeyAttr);
									if (fujaba__Success) {
										// story node 'Add match to rule result'
										try {
											fujaba__Success = false;

											// check object match is really bound
											JavaSDM.ensure(match != null);
											// check object ruleresult is really bound
											JavaSDM.ensure(ruleresult != null);

											// create link
											ruleresult.getMatches().add(match);

											fujaba__Success = true;
										} catch (JavaSDMException fujaba__InternalException) {
											fujaba__Success = false;
										}

									} else {

									}

									fujaba__Success = true;
								} catch (JavaSDMException fujaba__InternalException) {
									fujaba__Success = false;
								}
							}
							JavaSDM.ensure(fujaba__Success);

							fujaba__Success = true;
						} catch (JavaSDMException fujaba__InternalException) {
							fujaba__Success = false;
						}
					}
					JavaSDM.ensure(fujaba__Success);

					fujaba__Success = true;
				} catch (JavaSDMException fujaba__InternalException) {
					fujaba__Success = false;
				}
			}
			JavaSDM.ensure(fujaba__Success);

			fujaba__Success = true;
		} catch (JavaSDMException fujaba__InternalException) {
			fujaba__Success = false;
		}

		// story node 'set success'
		try {
			fujaba__Success = false;

			// check object ruleresult is really bound
			JavaSDM.ensure(ruleresult != null);
			// iterate to-many link matches from ruleresult to match
			fujaba__Success = false;

			fujaba__IterRuleresultToMatch = ruleresult.getMatches().iterator();

			while (!(fujaba__Success)
					&& fujaba__IterRuleresultToMatch.hasNext()) {
				try {
					match = (Match) fujaba__IterRuleresultToMatch.next();

					// check object match is really bound
					JavaSDM.ensure(match != null);

					fujaba__Success = true;
				} catch (JavaSDMException fujaba__InternalException) {
					fujaba__Success = false;
				}
			}
			JavaSDM.ensure(fujaba__Success);
			// assign attribute ruleresult
			ruleresult.setSuccess(true);
			fujaba__Success = true;
		} catch (JavaSDMException fujaba__InternalException) {
			fujaba__Success = false;
		}

		return ruleresult;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public IsAppropriateRuleResult isAppropriate_FWD_Attribute_3(
			Attribute androidMapsApiKeyAttr) {
		boolean fujaba__Success = false;
		Object _TmpObject = null;
		EClass eClass = null;
		Iterator fujaba__IterEClassToPerformOperation = null;
		EOperation performOperation = null;
		IsAppropriateRuleResult ruleresult = null;
		Match match = null;
		Iterator fujaba__IterApplicationNodeToTitleAttr = null;
		Attribute titleAttr = null;
		Iterator fujaba__IterApplicationNodeToPackageNameAttr = null;
		Attribute packageNameAttr = null;
		Iterator fujaba__IterApplicationNodeToAndroidPlayLibraryPathAttr = null;
		Attribute androidPlayLibraryPathAttr = null;
		Node applicationNode = null;
		Iterator fujaba__IterRuleresultToMatch = null;

		// story node 'prepare return value'
		try {
			fujaba__Success = false;

			_TmpObject = (this.eClass());

			// ensure correct type and really bound of object eClass
			JavaSDM.ensure(_TmpObject instanceof EClass);
			eClass = (EClass) _TmpObject;
			// iterate to-many link eOperations from eClass to performOperation
			fujaba__Success = false;

			fujaba__IterEClassToPerformOperation = eClass.getEOperations()
					.iterator();

			while (!(fujaba__Success)
					&& fujaba__IterEClassToPerformOperation.hasNext()) {
				try {
					performOperation = (EOperation) fujaba__IterEClassToPerformOperation
							.next();

					// check object performOperation is really bound
					JavaSDM.ensure(performOperation != null);
					// attribute condition
					JavaSDM.ensure(JavaSDM.stringCompare(
							performOperation.getName(), "isApplicable_FWD") == 0);

					fujaba__Success = true;
				} catch (JavaSDMException fujaba__InternalException) {
					fujaba__Success = false;
				}
			}
			JavaSDM.ensure(fujaba__Success);
			// create object ruleresult
			ruleresult = TGGRuntimeFactory.eINSTANCE
					.createIsAppropriateRuleResult();

			// assign attribute ruleresult
			ruleresult.setSuccess(false);

			// create link
			ruleresult.setPerformOperation(performOperation);

			fujaba__Success = true;
		} catch (JavaSDMException fujaba__InternalException) {
			fujaba__Success = false;
		}

		// story node 'test core match'
		try {
			fujaba__Success = false;

			// check object androidMapsApiKeyAttr is really bound
			JavaSDM.ensure(androidMapsApiKeyAttr != null);
			// check object ruleresult is really bound
			JavaSDM.ensure(ruleresult != null);
			// bind object
			applicationNode = androidMapsApiKeyAttr.getNode();

			// check object applicationNode is really bound
			JavaSDM.ensure(applicationNode != null);

			// iterate to-many link attribute from applicationNode to androidPlayLibraryPathAttr
			fujaba__Success = false;

			fujaba__IterApplicationNodeToAndroidPlayLibraryPathAttr = new ArrayList(
					applicationNode.getAttribute()).iterator();

			while (fujaba__IterApplicationNodeToAndroidPlayLibraryPathAttr
					.hasNext()) {
				try {
					androidPlayLibraryPathAttr = (Attribute) fujaba__IterApplicationNodeToAndroidPlayLibraryPathAttr
							.next();

					// check object androidPlayLibraryPathAttr is really bound
					JavaSDM.ensure(androidPlayLibraryPathAttr != null);
					// check isomorphic binding between objects androidPlayLibraryPathAttr and androidMapsApiKeyAttr 
					JavaSDM.ensure(!androidPlayLibraryPathAttr
							.equals(androidMapsApiKeyAttr));

					// iterate to-many link attribute from applicationNode to packageNameAttr
					fujaba__Success = false;

					fujaba__IterApplicationNodeToPackageNameAttr = new ArrayList(
							applicationNode.getAttribute()).iterator();

					while (fujaba__IterApplicationNodeToPackageNameAttr
							.hasNext()) {
						try {
							packageNameAttr = (Attribute) fujaba__IterApplicationNodeToPackageNameAttr
									.next();

							// check object packageNameAttr is really bound
							JavaSDM.ensure(packageNameAttr != null);
							// check isomorphic binding between objects packageNameAttr and androidMapsApiKeyAttr 
							JavaSDM.ensure(!packageNameAttr
									.equals(androidMapsApiKeyAttr));

							// check isomorphic binding between objects packageNameAttr and androidPlayLibraryPathAttr 
							JavaSDM.ensure(!packageNameAttr
									.equals(androidPlayLibraryPathAttr));

							// iterate to-many link attribute from applicationNode to titleAttr
							fujaba__Success = false;

							fujaba__IterApplicationNodeToTitleAttr = new ArrayList(
									applicationNode.getAttribute()).iterator();

							while (fujaba__IterApplicationNodeToTitleAttr
									.hasNext()) {
								try {
									titleAttr = (Attribute) fujaba__IterApplicationNodeToTitleAttr
											.next();

									// check object titleAttr is really bound
									JavaSDM.ensure(titleAttr != null);
									// check isomorphic binding between objects titleAttr and androidMapsApiKeyAttr 
									JavaSDM.ensure(!titleAttr
											.equals(androidMapsApiKeyAttr));

									// check isomorphic binding between objects titleAttr and androidPlayLibraryPathAttr 
									JavaSDM.ensure(!titleAttr
											.equals(androidPlayLibraryPathAttr));

									// check isomorphic binding between objects titleAttr and packageNameAttr 
									JavaSDM.ensure(!titleAttr
											.equals(packageNameAttr));

									// attribute condition
									JavaSDM.ensure(JavaSDM.stringCompare(
											applicationNode.getName(),
											"Application") == 0);

									// attribute condition
									JavaSDM.ensure(JavaSDM.stringCompare(
											androidMapsApiKeyAttr.getName(),
											"androidMapsApiKey") == 0);

									// attribute condition
									JavaSDM.ensure(JavaSDM.stringCompare(
											androidPlayLibraryPathAttr
													.getName(),
											"androidPlayLibraryPath") == 0);

									// attribute condition
									JavaSDM.ensure(JavaSDM.stringCompare(
											packageNameAttr.getName(),
											"packageName") == 0);

									// attribute condition
									JavaSDM.ensure(JavaSDM.stringCompare(
											titleAttr.getName(), "title") == 0);

									// create object match
									match = TGGRuntimeFactory.eINSTANCE
											.createMatch();

									// statement node 'bookkeeping with generic isAppropriate method'
									fujaba__Success = this.isAppropriate_FWD(
											match, applicationNode, titleAttr,
											packageNameAttr,
											androidPlayLibraryPathAttr,
											androidMapsApiKeyAttr);
									if (fujaba__Success) {
										// story node 'Add match to rule result'
										try {
											fujaba__Success = false;

											// check object match is really bound
											JavaSDM.ensure(match != null);
											// check object ruleresult is really bound
											JavaSDM.ensure(ruleresult != null);

											// create link
											ruleresult.getMatches().add(match);

											fujaba__Success = true;
										} catch (JavaSDMException fujaba__InternalException) {
											fujaba__Success = false;
										}

									} else {

									}

									fujaba__Success = true;
								} catch (JavaSDMException fujaba__InternalException) {
									fujaba__Success = false;
								}
							}
							JavaSDM.ensure(fujaba__Success);

							fujaba__Success = true;
						} catch (JavaSDMException fujaba__InternalException) {
							fujaba__Success = false;
						}
					}
					JavaSDM.ensure(fujaba__Success);

					fujaba__Success = true;
				} catch (JavaSDMException fujaba__InternalException) {
					fujaba__Success = false;
				}
			}
			JavaSDM.ensure(fujaba__Success);

			fujaba__Success = true;
		} catch (JavaSDMException fujaba__InternalException) {
			fujaba__Success = false;
		}

		// story node 'set success'
		try {
			fujaba__Success = false;

			// check object ruleresult is really bound
			JavaSDM.ensure(ruleresult != null);
			// iterate to-many link matches from ruleresult to match
			fujaba__Success = false;

			fujaba__IterRuleresultToMatch = ruleresult.getMatches().iterator();

			while (!(fujaba__Success)
					&& fujaba__IterRuleresultToMatch.hasNext()) {
				try {
					match = (Match) fujaba__IterRuleresultToMatch.next();

					// check object match is really bound
					JavaSDM.ensure(match != null);

					fujaba__Success = true;
				} catch (JavaSDMException fujaba__InternalException) {
					fujaba__Success = false;
				}
			}
			JavaSDM.ensure(fujaba__Success);
			// assign attribute ruleresult
			ruleresult.setSuccess(true);
			fujaba__Success = true;
		} catch (JavaSDMException fujaba__InternalException) {
			fujaba__Success = false;
		}

		return ruleresult;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public IsAppropriateRuleResult isAppropriate_BWD_BlipApplication_0(
			BlipApplication application) {
		boolean fujaba__Success = false;
		Object _TmpObject = null;
		EClass eClass = null;
		Iterator fujaba__IterEClassToPerformOperation = null;
		EOperation performOperation = null;
		IsAppropriateRuleResult ruleresult = null;
		Match match = null;
		Iterator fujaba__IterRuleresultToMatch = null;

		// story node 'prepare return value'
		try {
			fujaba__Success = false;

			_TmpObject = (this.eClass());

			// ensure correct type and really bound of object eClass
			JavaSDM.ensure(_TmpObject instanceof EClass);
			eClass = (EClass) _TmpObject;
			// iterate to-many link eOperations from eClass to performOperation
			fujaba__Success = false;

			fujaba__IterEClassToPerformOperation = eClass.getEOperations()
					.iterator();

			while (!(fujaba__Success)
					&& fujaba__IterEClassToPerformOperation.hasNext()) {
				try {
					performOperation = (EOperation) fujaba__IterEClassToPerformOperation
							.next();

					// check object performOperation is really bound
					JavaSDM.ensure(performOperation != null);
					// attribute condition
					JavaSDM.ensure(JavaSDM.stringCompare(
							performOperation.getName(), "isApplicable_BWD") == 0);

					fujaba__Success = true;
				} catch (JavaSDMException fujaba__InternalException) {
					fujaba__Success = false;
				}
			}
			JavaSDM.ensure(fujaba__Success);
			// create object ruleresult
			ruleresult = TGGRuntimeFactory.eINSTANCE
					.createIsAppropriateRuleResult();

			// assign attribute ruleresult
			ruleresult.setSuccess(false);

			// create link
			ruleresult.setPerformOperation(performOperation);

			fujaba__Success = true;
		} catch (JavaSDMException fujaba__InternalException) {
			fujaba__Success = false;
		}

		// story node 'test core match'
		try {
			fujaba__Success = false;

			// check object application is really bound
			JavaSDM.ensure(application != null);
			// check object ruleresult is really bound
			JavaSDM.ensure(ruleresult != null);
			// create object match
			match = TGGRuntimeFactory.eINSTANCE.createMatch();

			// statement node 'bookkeeping with generic isAppropriate method'
			fujaba__Success = this.isAppropriate_BWD(match, application);
			if (fujaba__Success) {
				// story node 'Add match to rule result'
				try {
					fujaba__Success = false;

					// check object match is really bound
					JavaSDM.ensure(match != null);
					// check object ruleresult is really bound
					JavaSDM.ensure(ruleresult != null);

					// create link
					ruleresult.getMatches().add(match);

					fujaba__Success = true;
				} catch (JavaSDMException fujaba__InternalException) {
					fujaba__Success = false;
				}

			} else {

			}
			fujaba__Success = true;
		} catch (JavaSDMException fujaba__InternalException) {
			fujaba__Success = false;
		}

		// story node 'set success'
		try {
			fujaba__Success = false;

			// check object ruleresult is really bound
			JavaSDM.ensure(ruleresult != null);
			// iterate to-many link matches from ruleresult to match
			fujaba__Success = false;

			fujaba__IterRuleresultToMatch = ruleresult.getMatches().iterator();

			while (!(fujaba__Success)
					&& fujaba__IterRuleresultToMatch.hasNext()) {
				try {
					match = (Match) fujaba__IterRuleresultToMatch.next();

					// check object match is really bound
					JavaSDM.ensure(match != null);

					fujaba__Success = true;
				} catch (JavaSDMException fujaba__InternalException) {
					fujaba__Success = false;
				}
			}
			JavaSDM.ensure(fujaba__Success);
			// assign attribute ruleresult
			ruleresult.setSuccess(true);
			fujaba__Success = true;
		} catch (JavaSDMException fujaba__InternalException) {
			fujaba__Success = false;
		}

		return ruleresult;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public Object eInvoke(int operationID, EList<?> arguments)
			throws InvocationTargetException {
		switch (operationID) {
		case RulesPackage.MAPPLICATION_TO_APPLICATION_RULE___PERFORM_FWD__ISAPPLICABLEMATCH:
			return perform_FWD((IsApplicableMatch) arguments.get(0));
		case RulesPackage.MAPPLICATION_TO_APPLICATION_RULE___IS_APPROPRIATE_FWD__MATCH_NODE_ATTRIBUTE_ATTRIBUTE_ATTRIBUTE_ATTRIBUTE:
			return isAppropriate_FWD((Match) arguments.get(0),
					(Node) arguments.get(1), (Attribute) arguments.get(2),
					(Attribute) arguments.get(3), (Attribute) arguments.get(4),
					(Attribute) arguments.get(5));
		case RulesPackage.MAPPLICATION_TO_APPLICATION_RULE___IS_APPLICABLE_FWD__MATCH:
			return isApplicable_FWD((Match) arguments.get(0));
		case RulesPackage.MAPPLICATION_TO_APPLICATION_RULE___PERFORM_BWD__ISAPPLICABLEMATCH:
			return perform_BWD((IsApplicableMatch) arguments.get(0));
		case RulesPackage.MAPPLICATION_TO_APPLICATION_RULE___IS_APPROPRIATE_BWD__MATCH_BLIPAPPLICATION:
			return isAppropriate_BWD((Match) arguments.get(0),
					(BlipApplication) arguments.get(1));
		case RulesPackage.MAPPLICATION_TO_APPLICATION_RULE___IS_APPLICABLE_BWD__MATCH:
			return isApplicable_BWD((Match) arguments.get(0));
		case RulesPackage.MAPPLICATION_TO_APPLICATION_RULE___IS_APPROPRIATE_FWD_NODE_0__NODE:
			return isAppropriate_FWD_Node_0((Node) arguments.get(0));
		case RulesPackage.MAPPLICATION_TO_APPLICATION_RULE___IS_APPROPRIATE_FWD_ATTRIBUTE_0__ATTRIBUTE:
			return isAppropriate_FWD_Attribute_0((Attribute) arguments.get(0));
		case RulesPackage.MAPPLICATION_TO_APPLICATION_RULE___IS_APPROPRIATE_FWD_ATTRIBUTE_1__ATTRIBUTE:
			return isAppropriate_FWD_Attribute_1((Attribute) arguments.get(0));
		case RulesPackage.MAPPLICATION_TO_APPLICATION_RULE___IS_APPROPRIATE_FWD_ATTRIBUTE_2__ATTRIBUTE:
			return isAppropriate_FWD_Attribute_2((Attribute) arguments.get(0));
		case RulesPackage.MAPPLICATION_TO_APPLICATION_RULE___IS_APPROPRIATE_FWD_ATTRIBUTE_3__ATTRIBUTE:
			return isAppropriate_FWD_Attribute_3((Attribute) arguments.get(0));
		case RulesPackage.MAPPLICATION_TO_APPLICATION_RULE___IS_APPROPRIATE_BWD_BLIP_APPLICATION_0__BLIPAPPLICATION:
			return isAppropriate_BWD_BlipApplication_0((BlipApplication) arguments
					.get(0));
		}
		return super.eInvoke(operationID, arguments);
	}

} //MApplicationToApplicationRuleImpl
